matomo-web-statistics/docker-compose.yml

59 lines
1.3 KiB
YAML

version: '3'
services:
db:
image: mariadb:10.11
command: --max-allowed-packet=64MB
restart: always
volumes:
- matomo_db:/var/lib/mysql
environment:
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
- MYSQL_PASSWORD=${MYSQL_PASSWORD}
- MYSQL_DATABASE=matomo
- MYSQL_USER=matomo
networks:
- matomo_network
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost"]
interval: 30s
timeout: 10s
retries: 5
matomo:
image: matomo:5-apache
restart: always
volumes:
- matomo_data:/var/www/html
- matomo_config:/var/www/html/config
environment:
- MATOMO_DATABASE_HOST=db
- MATOMO_DATABASE_DBNAME=matomo
- MATOMO_DATABASE_USERNAME=matomo
- MATOMO_DATABASE_PASSWORD=${MYSQL_PASSWORD}
- MATOMO_DATABASE_TABLES_PREFIX=matomo_
- PHP_MEMORY_LIMIT=512M
- MATOMO_ENABLE_FORCE_SSL=1
ports:
- "8080:80"
depends_on:
- db
networks:
- matomo_network
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:80"]
interval: 30s
timeout: 10s
retries: 5
volumes:
matomo_db:
driver: local
matomo_data:
driver: local
matomo_config:
driver: local
networks:
matomo_network:
driver: bridge