KazV2/config/orgaTmpl/docker-compose.yml
2024-06-03 18:43:35 +02:00

308 lines
7.8 KiB
YAML

version: '3.3'
#{{services
services:
#}}
#{{db
db:
image: mariadb:10.5
container_name: ${orga}DB
#disk_quota: 10G
command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW
restart: ${restartPolicy}
volumes:
- ./initdb.d:/docker-entrypoint-initdb.d:ro
- orgaDB:/var/lib/mysql
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro
env_file:
- ../../secret/env-${nextcloudDBName}
# - ../../secret/env-${mattermostDBName}
- ../../secret/env-${wordpressDBName}
networks:
- orgaNet
healthcheck: # utilisé par init-db.sh pour la créa d'orga
test: ["CMD", 'mysqladmin', 'ping', '-h', 'localhost', '-u', 'root', '-p$$MYSQL_ROOT_PASSWORD' ]
interval: 30s
timeout: 30s
retries: 5
#}}
#{{cloud
cloud:
image: nextcloud
container_name: ${orga}${nextcloudServName}
#disk_quota: 10G
restart: ${restartPolicy}
networks:
- orgaNet
# - postfixNet
depends_on:
- db
#db:
# condition: service_healthy # on peut mais ca va ralentir le process
links:
- db
external_links:
- ${smtpServName}:${smtpHost}
labels:
- "traefik.enable=true"
- "traefik.http.routers.${orga}${nextcloudServName}.rule=Host(`${orga}${cloudHost}.${domain}`){{FOREIGN_NC}}"
- "traefik.http.routers.${orga}${nextcloudServName}.middlewares=nextcloud-redirectregex1@file,nextcloud-redirectregex2@file"
volumes:
- cloudMain:/var/www/html
- cloudData:/var/www/html/data
- cloudConfig:/var/www/html/config
- cloudApps:/var/www/html/apps
- cloudCustomApps:/var/www/html/custom_apps
- cloudThemes:/var/www/html/themes/
- cloudPhp:/usr/local/etc/php/conf.d/
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro
env_file:
- ../../secret/env-${nextcloudServName}
- ../../secret/env-${nextcloudDBName}
environment:
- NEXTCLOUD_TRUSTED_DOMAINS=${orga}${cloudHost}.${domain}
- SMTP_HOST=${smtpHost}
- SMTP_PORT=25
- MAIL_DOMAIN=${domain}
#}}
#{{agora
agora:
build:
context: app
# uncomment following lines for team edition or change UID/GID
args:
- edition=team
- PUID=1000
- PGID=1000
container_name: ${orga}${mattermostServName}
#disk_quota: 10G
restart: ${restartPolicy}
# memory: 1G
networks:
- orgaNet
# - postfixNet
expose:
- ${matterPort}
depends_on:
- db
#db:
# condition: service_healthy # on peut mais ca va ralentir le process
links:
- db
external_links:
- ${smtpServName}:${smtpHost}.${domain}
volumes:
- matterConfig:/mattermost/config:rw
- matterData:/mattermost/data:rw
- matterLogs:/mattermost/logs:rw
- matterPlugins:/mattermost/plugins:rw
- matterClientPlugins:/mattermost/client/plugins:rw
- matterIcons:/mattermost/client/images:ro
- /etc/ssl:/etc/ssl:ro
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro
- /etc/environment:/etc/environment:ro
env_file:
- ../../secret/env-${mattermostServName}
environment:
- VIRTUAL_HOST=${orga}${matterHost}.${domain}
# in case your config is not in default location
#- MM_CONFIG=/mattermost/config/config.json
labels:
- "traefik.enable=true"
- "traefik.http.routers.${orga}${mattermostServName}.rule=Host(`${orga}${matterHost}.${domain}`)"
#}}
#{{wp
wordpress:
image: wordpress
container_name: ${orga}${wordpressServName}
restart: ${restartPolicy}
networks:
- orgaNet
# - postfixNet
depends_on:
- db
#db:
# condition: service_healthy # on peut mais ca va ralentir le process
links:
- db
external_links:
- ${smtpServName}:${smtpHost}.${domain}
env_file:
- ../../secret/env-${wordpressServName}
environment:
- WORDPRESS_SMTP_HOST=${smtpHost}.${domain}
- WORDPRESS_SMTP_PORT=25
# - WORDPRESS_SMTP_USERNAME
# - WORDPRESS_SMTP_PASSWORD
# - WORDPRESS_SMTP_FROM=${orga}
- WORDPRESS_SMTP_FROM_NAME=${orga}
labels:
- "traefik.enable=true"
- "traefik.http.routers.${orga}${wordpressServName}.rule=Host(`${orga}${wordpressHost}.${domain}`){{FOREIGN_WP}}"
volumes:
- wordpress:/var/www/html
# - ../../config/orgaTmpl/wp:/usr/local/bin/wp:ro
#}}
#{{wiki
dokuwiki:
image: mprasil/dokuwiki
container_name: ${orga}${dokuwikiServName}
#disk_quota: 10G
restart: ${restartPolicy}
labels:
- "traefik.enable=true"
- "traefik.http.routers.${orga}${dokuwikiServName}.rule=Host(`${orga}${dokuwikiHost}.${domain}`){{FOREIGN_DW}}"
volumes:
- wikiData:/dokuwiki/data
- wikiConf:/dokuwiki/conf
- wikiPlugins:/dokuwiki/lib/plugins
- wikiLibtpl:/dokuwiki/lib/tpl
- wikiLogs:/var/log
networks:
- orgaNet
# - postfixNet
external_links:
- ${smtpServName}:${smtpHost}.${domain}
#}}
#{{castopod
castopod:
image: castopod/castopod:latest
container_name: ${orga}${castopodServName}
#disk_quota: 10G
restart: ${restartPolicy}
# memory: 1G
networks:
- orgaNet
# - postfixNet
expose:
- 8000
depends_on:
- db
links:
- db
external_links:
- ${smtpServName}:${smtpHost}.${domain}
volumes:
- castopodMedia:/var/www/castopod/public/media
environment:
CP_BASEURL: "https://${orga}${castopodHost}.${domain}"
CP_ANALYTICS_SALT: qldsgfliuzrbhgmkjbdbmkvb
VIRTUAL_PORT: 8000
CP_CACHE_HANDLER: redis
CP_REDIS_HOST: redis
CP_DATABASE_HOSTNAME: db
env_file:
- ../../secret/env-${castopodServName}
- ../../secret/env-${castopodDBName}
labels:
- "traefik.enable=true"
- "traefik.http.routers.${orga}${castopodServName}.rule=Host(`${orga}${castopodHost}.${domain}`){{FOREIGN_POD}}"
redis:
image: redis:7.0-alpine
container_name: ${orga}castopodCache
volumes:
- castopodCache:/data
networks:
- orgaNet
env_file:
- ../../secret/env-${castopodServName}
command: --requirepass ${castopodRedisPassword}
#}}
#{{services
volumes:
#}}
#{{db
orgaDB:
external: true
name: orga_${orga}orgaDB
#}}
#{{agora
matterConfig:
external: true
name: orga_${orga}matterConfig
matterData:
external: true
name: orga_${orga}matterData
matterLogs:
external: true
name: orga_${orga}matterLogs
matterPlugins:
external: true
name: orga_${orga}matterPlugins
matterClientPlugins:
external: true
name: orga_${orga}matterClientPlugins
matterIcons:
external: true
name: matterIcons
#{{cloud
cloudMain:
external: true
name: orga_${orga}cloudMain
cloudData:
external: true
name: orga_${orga}cloudData
cloudConfig:
external: true
name: orga_${orga}cloudConfig
cloudApps:
external: true
name: orga_${orga}cloudApps
cloudCustomApps:
external: true
name: orga_${orga}cloudCustomApps
cloudThemes:
external: true
name: orga_${orga}cloudThemes
cloudPhp:
external: true
name: orga_${orga}cloudPhp
#}}
#{{wiki
wikiData:
external: true
name: orga_${orga}wikiData
wikiConf:
external: true
name: orga_${orga}wikiConf
wikiPlugins:
external: true
name: orga_${orga}wikiPlugins
wikiLibtpl:
external: true
name: orga_${orga}wikiLibtpl
wikiLogs:
external: true
name: orga_${orga}wikiLogs
#}}
#{{wp
wordpress:
external: true
name: orga_${orga}wordpress
#}}
#{{castopod
castopodMedia:
external: true
name: orga_${orga}castopodMedia
castopodCache:
external: true
name: orga_${orga}castopodCache
#}}
networks:
orgaNet:
external: true
name: ${orga}orgaNet
# postfixNet:
# external:
# name: postfixNet