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

  app:
    image: matomo:latest
    restart: always
    depends_on:
      - db
    volumes:
      - ./.matomo/config:/var/www/html/config:z
      - ./.matomo/logs:/var/www/html/logs:z
      - matomo:/var/www/html:z
    env_file:
      - ./db.env
    ports:
      - 8080:80

volumes:
  db:
  matomo:
