Liberating Web Analytics https://github.com/matomo-org/matomo
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

72 lines
2.0 KiB

---
version: "3.8"
services:
app:
image: matomo:4.3.1
depends_on:
- db
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})"
- "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}"
- "coop-cloud.${STACK_NAME}.version=0.1.0+4.3.1"
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
volumes:
mariadb:
matomo_config:
matomo_logs:
secrets:
db_password:
external: true
name: ${STACK_NAME}_db_password_${DB_PASSWORD_VERSION}
db_root_password:
external: true
name: ${STACK_NAME}_db_root_password_${DB_ROOT_PASSWORD_VERSION}
networks:
proxy:
external: true
internal: