matomo/docker-compose.yml

71 lines
2.0 KiB
YAML
Raw Permalink Normal View History

2020-05-10 21:55:33 +00:00
version: "3.7"
services:
matomo:
2020-08-28 20:55:29 +00:00
image: matomo:3.14.0-fpm-alpine@sha256:850d3787a2ba475a1f3dd8f19e3b14fcc039543c885966a2bb00879b5d9359ff
2020-05-10 21:55:33 +00:00
deploy:
placement:
constraints: [node.labels.com.sigyl.git-stack == yes]
replicas: 1
restart_policy:
condition: any
volumes:
# - ./config:/var/www/html/config:rw
# - ./logs:/var/www/html/logs
- matomo:/var/www/html
environment:
- MATOMO_DATABASE_HOST=matomo-mariadb
2020-08-28 20:55:29 +00:00
- MYSQL_PASSWORD=${MYSQL_PASSWORD}
2020-05-10 21:55:33 +00:00
- MYSQL_DATABASE=matomo
- MYSQL_USER=matomo
- MATOMO_DATABASE_ADAPTER=mysql
- MATOMO_DATABASE_TABLES_PREFIX=matomo_
- MATOMO_DATABASE_USERNAME=matomo
2020-08-28 20:55:29 +00:00
- MATOMO_DATABASE_PASSWORD=${MYSQL_PASSWORD}
2020-05-10 21:55:33 +00:00
- MATOMO_DATABASE_DBNAME=matomo
networks:
- appnet
matomo-web:
2020-08-28 20:55:29 +00:00
image: nginx:1.19.2-alpine@sha256:4635b632d2aaf8c37c8a1cf76a1f96d11b899f74caa2c6946ea56d0a5af02c0c
2020-05-10 21:55:33 +00:00
deploy:
placement:
constraints: [node.labels.com.sigyl.git-stack == yes]
replicas: 1
restart_policy:
condition: any
volumes:
- matomo:/var/www/html:ro
# see https://github.com/matomo-org/matomo-nginx
- ./matomo/matomo.conf:/etc/nginx/conf.d/default.conf:ro
networks:
- appnet
- externalnet
matomo-mariadb:
deploy:
placement:
constraints: [node.labels.com.sigyl.git-stack-data == yes]
replicas: 1
restart_policy:
condition: any
2020-08-28 20:55:29 +00:00
image: mariadb:10.5.5@sha256:589c4347e21c2dd4292d8929091faf6d78e80acdcca6cb04aa0a1337f22765f1
2020-05-10 21:55:33 +00:00
command: --max-allowed-packet=128MB
networks:
- appnet
volumes:
- matomo-mariadb:/var/lib/mysql
environment:
2020-08-28 20:55:29 +00:00
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
2020-05-10 21:55:33 +00:00
MYSQL_USER: matomo
MYSQL_DATABASE: matomo
2020-08-28 20:55:29 +00:00
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
2020-05-10 21:55:33 +00:00
volumes:
matomo:
matomo-mariadb:
networks:
appnet:
driver: overlay
#external: true
externalnet:
driver: overlay
external: true