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