matomo/compose.yml

69 lines
2.1 KiB
YAML
Raw Normal View History

2020-09-23 19:25:43 +00:00
version: "3.8"
services:
app:
2021-04-03 12:38:46 +00:00
image: matomo:4.2.1
2020-09-25 10:18:15 +00:00
depends_on:
- db
2020-09-23 19:25:43 +00:00
volumes:
- "matomo_config:/var/www/html/config"
- "matomo_logs:/var/www/html/logs"
#- matomo:/var/www/html
environment:
- MATOMO_DATABASE_ADAPTER=mysql
- MATOMO_DATABASE_TABLES_PREFIX=matomo_
- MATOMO_DATABASE_USERNAME=matomo
- MATOMO_DATABASE_PASSWORD_FILE=/run/secrets/db_password
- MATOMO_DATABASE_DBNAME=matomo
- MATOMO_DATABASE_HOST=db
networks:
- proxy
- internal
secrets:
- db_password
deploy:
restart_policy:
condition: on-failure
labels:
- "traefik.enable=true"
- "traefik.docker.network=proxy"
- "traefik.http.services.${STACK_NAME}.loadbalancer.server.port=80"
- "traefik.http.routers.${STACK_NAME}.rule=Host(`${DOMAIN}`${EXTRA_DOMAINS})"
2020-09-23 19:25:43 +00:00
- "traefik.http.routers.${STACK_NAME}.tls.certresolver=${LETS_ENCRYPT_ENV}"
- "traefik.http.routers.${STACK_NAME}.entrypoints=web-secure"
- "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}"
2021-04-04 21:19:54 +00:00
- coop-cloud.${STACK_NAME}.app.version=4.2.1-632e4dce
db:
image: mysql:5.7
volumes:
- mariadb:/var/lib/mysql
environment:
- MYSQL_DATABASE=matomo
- MYSQL_USER=matomo
- MYSQL_PASSWORD_FILE=/run/secrets/db_password
- MYSQL_ROOT_PASSWORD_FILE=/run/secrets/db_root_password
networks:
- internal
secrets:
- db_root_password
- db_password
command: --max-allowed-packet=64MB
2021-04-04 21:19:54 +00:00
deploy:
2021-04-04 21:26:46 +00:00
labels: ['coop-cloud.${STACK_NAME}.db.version=5.7-dce7f54b']
2020-09-23 19:25:43 +00:00
volumes:
mariadb:
matomo_config:
matomo_logs:
secrets:
2020-09-25 10:18:15 +00:00
db_password:
external: true
name: ${STACK_NAME}_db_password_${DB_PASSWORD_VERSION}
db_root_password:
external: true
2020-09-23 19:25:43 +00:00
name: ${STACK_NAME}_db_root_password_${DB_ROOT_PASSWORD_VERSION}
networks:
proxy:
external: true
internal: