version: "3.7" services: matomo: image: matomo:3.14.0-fpm-alpine@sha256:850d3787a2ba475a1f3dd8f19e3b14fcc039543c885966a2bb00879b5d9359ff 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 - MYSQL_PASSWORD=${MYSQL_PASSWORD} - MYSQL_DATABASE=matomo - MYSQL_USER=matomo - MATOMO_DATABASE_ADAPTER=mysql - MATOMO_DATABASE_TABLES_PREFIX=matomo_ - MATOMO_DATABASE_USERNAME=matomo - MATOMO_DATABASE_PASSWORD=${MYSQL_PASSWORD} - MATOMO_DATABASE_DBNAME=matomo networks: - appnet matomo-web: image: nginx:1.19.2-alpine@sha256:4635b632d2aaf8c37c8a1cf76a1f96d11b899f74caa2c6946ea56d0a5af02c0c 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 image: mariadb:10.5.5@sha256:589c4347e21c2dd4292d8929091faf6d78e80acdcca6cb04aa0a1337f22765f1 command: --max-allowed-packet=128MB networks: - appnet volumes: - matomo-mariadb:/var/lib/mysql environment: MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD} MYSQL_USER: matomo MYSQL_DATABASE: matomo MYSQL_PASSWORD: ${MYSQL_PASSWORD} volumes: matomo: matomo-mariadb: networks: appnet: driver: overlay #external: true externalnet: driver: overlay external: true