# {{ ansible_managed }} services: matomo: image: matomo:{{ docker_matomo_image_version }} restart: always volumes: - {{ docker_matomo_data_dir }}/{{ docker_matomo_service_id }}/matomo_html:/var/www/html environment: MATOMO_DATABASE_HOST: db MATOMO_DATABASE_ADAPTER: mysql MATOMO_DATABASE_TABLES_PREFIX: matomo_ MATOMO_DATABASE_DBNAME: "{{ docker_matomo_db_name }}" MATOMO_DATABASE_USERNAME: "{{ docker_matomo_db_user }}" MATOMO_DATABASE_PASSWORD: "{{ docker_matomo_db_password }}" labels: - "traefik.enable=true" - "traefik.docker.network=traefik" - "traefik.http.routers.{{ docker_matomo_service_id }}.entrypoints=web" - "traefik.http.routers.{{ docker_matomo_service_id }}.rule=Host(`{{ docker_matomo_fqdn }}`)" - "traefik.http.services.{{ docker_matomo_service_id }}.loadbalancer.server.port=80" networks: - traefik - matomo db: image: mariadb:10.8.2-rc-focal restart: always volumes: - {{ docker_matomo_data_dir }}/{{ docker_matomo_service_id }}/mariadb:/var/lib/mysql environment: # genere un mdp root et l'affiche au demarrage sur stdout MARIADB_RANDOM_ROOT_PASSWORD: "yes" MARIADB_DATABASE: "{{ docker_matomo_db_name }}" MARIADB_USER: "{{ docker_matomo_db_user }}" MARIADB_PASSWORD: "{{ docker_matomo_db_password }}" networks: - matomo networks: traefik: external: true matomo: internal: true