75 lines
2.1 KiB
YAML
75 lines
2.1 KiB
YAML
version: "3.8"
|
|
|
|
services:
|
|
app:
|
|
image: "xwiki:stable-mysql-tomcat"
|
|
environment:
|
|
- DB_USER=xwiki
|
|
- DB_PASSWORD_FILE=/run/secrets/db_password
|
|
- DB_DATABASE=xwiki
|
|
- DB_HOST=${STACK_NAME}_db
|
|
volumes:
|
|
- xwiki-data:/usr/local/xwiki
|
|
- xwiki_cfg:/usr/local/tomcat/webapps/ROOT/WEB-INF/
|
|
secrets:
|
|
- db_password
|
|
networks:
|
|
- proxy
|
|
- internal
|
|
deploy:
|
|
restart_policy:
|
|
condition: on-failure
|
|
labels:
|
|
- "traefik.enable=true"
|
|
- "traefik.http.services.${STACK_NAME}.loadbalancer.server.port=8080"
|
|
- "traefik.http.routers.${STACK_NAME}.rule=Host(`${DOMAIN}`${EXTRA_DOMAINS})"
|
|
- "traefik.http.routers.${STACK_NAME}.entrypoints=web-secure"
|
|
- "traefik.http.routers.${STACK_NAME}.tls.certresolver=${LETS_ENCRYPT_ENV}"
|
|
## Redirect from EXTRA_DOMAINS to DOMAIN
|
|
#- "traefik.http.routers.${STACK_NAME}.middlewares=${STACK_NAME}-redirect"
|
|
#- "traefik.http.middlewares.${STACK_NAME}-redirect.headers.SSLForceHost=true"
|
|
#- "traefik.http.middlewares.${STACK_NAME}-redirect.headers.SSLHost=${DOMAIN}"
|
|
- "coop-cloud.${STACK_NAME}.version="
|
|
# healthcheck:
|
|
# test: ["CMD", "curl", "-f", "http://localhost"]
|
|
# interval: 30s
|
|
# timeout: 10s
|
|
# retries: 10
|
|
# start_period: 1m
|
|
db:
|
|
image: "mysql:9.1"
|
|
networks:
|
|
- internal
|
|
volumes:
|
|
- mysql-data:/var/lib/mysql
|
|
environment:
|
|
- MYSQL_ROOT_PASSWORD_FILE=/run/secrets/db_root_password
|
|
- MYSQL_USER=xwiki
|
|
- MYSQL_PASSWORD_FILE=/run/secrets/db_password
|
|
- MYSQL_DATABASE=xwiki
|
|
command:
|
|
- "--character-set-server=utf8mb4"
|
|
- "--collation-server=utf8mb4_bin"
|
|
- "--explicit-defaults-for-timestamp=1"
|
|
secrets:
|
|
- db_password
|
|
- db_root_password
|
|
|
|
networks:
|
|
proxy:
|
|
external: true
|
|
internal:
|
|
|
|
volumes:
|
|
mysql-data:
|
|
xwiki-data:
|
|
xwiki_cfg:
|
|
|
|
secrets:
|
|
db_password:
|
|
name: ${STACK_NAME}_db_password_${SECRET_DB_PASSWORD_VERSION}
|
|
external: true
|
|
db_root_password:
|
|
name: ${STACK_NAME}_db_root_password_${SECRET_DB_ROOT_PASSWORD_VERSION}
|
|
external: true
|