version: '3'
services:
  mariadb:
    image: mariadb:latest
    container_name: dev_matomo_mariadb
    ports:
      - 3306
    volumes:
      - ../_shared/mysql/conf.d:/etc/mysql/conf.d
      - ./volumes/mariadb:/var/lib/mysql
    environment:
      MYSQL_ROOT_PASSWORD: ${EWT_MYSQL_PASSWORD}
      MYSQL_DATABASE: dev_matomo
  www:
    image: matomo:latest
    container_name: dev_matomo_www
    ports:
      - 80
    volumes:
      - ./www:/var/www/html
      - $SSH_AUTH_SOCK:$SSH_AUTH_SOCK
    environment:
      SSH_AUTH_SOCK: $SSH_AUTH_SOCK
      VIRTUAL_HOST: 'matomo.dev.docker'
      CERT_NAME: dev.docker
  nginx-proxy:
    image: jwilder/nginx-proxy
    container_name: dev_matomo_proxy
    ports:
      - 80:80
      - 443:443
    volumes:
      - /var/run/docker.sock:/tmp/docker.sock:ro
      - ../_shared/certs:/etc/nginx/certs
      - ../_shared/nginx/webdev-nginx.conf:/etc/nginx/conf.d/webdev-nginx.conf
