matomo-org / docker

Official Docker project for Matomo Analytics

Home Page:https://matomo.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Missing internal network on apache example compose file

BraianPita opened this issue · comments

The current docker-compose.yml inside the .example/apache folder is missing an internal network to allow the app service to connect to the db service.

This is my current working docker-compose file:

version: "3"

services:
  db:
    image: mariadb:10.11
    command: --max-allowed-packet=64MB
    restart: always
    volumes:
      - db:/var/lib/mysql:Z
    env_file:
      - ./db.env
    networks:
      - matomo-network

  app:
    container_name: matomo
    image: matomo
    restart: always
    volumes:
#     - ./config:/var/www/html/config:z
#     - ./logs:/var/www/html/logs:z
      - matomo:/var/www/html:z
    environment:
      - MATOMO_DATABASE_HOST=db
    env_file:
      - ./db.env
    expose:
      - 80
    networks:
      - matomo-network
      - reverse-proxy-network

volumes:
  db:
  matomo:

networks:
  matomo-network:
  reverse-proxy-network:
    external: true