# 1. copy the content of this file to Portainer stack editor
# 2. if no database is required, remove db service (lines 11 to 23)
# 3. replace PATH_TO_PROJECT by absolute path to project directory (usually /home/meltingk/xxxx)
# 4. fill environment variables:
#    - MYSQL_*: MySQL informations if necessary
#    - VIRTUAL_HOST: comma-separated list of all domains
#    - VIRUTAL_HOST_ALIAS: comma-separated list of all domains except main one
#    - LETSENCRYPT_HOST: comma-separated list of all domains (same as VIRTUAL_HOST)

services:
  db:
    image: mysql:5.7
    volumes:
      - "PATH_TO_PROJECT/docker/mysql/conf.d:/etc/mysql/conf.d"
      - "PATH_TO_PROJECT/docker/mysql/data:/var/lib/mysql"
    environment:
      - MYSQL_ROOT_PASSWORD=
      - MYSQL_DATABASE=
      - MYSQL_USER=
      - MYSQL_PASSWORD=

  www:
    image: ghcr.io/melting-k/www:7.4
    volumes:
      - "PATH_TO_PROJECT/docker/www/vhosts-prod:/etc/apache2/sites-enabled"
      - "PATH_TO_PROJECT/docker/logs/apache2:/var/log/apache2"
      - "PATH_TO_PROJECT/app/:/src/app/"
      - "PATH_TO_PROJECT/admin/:/src/admin/"
    environment:
      - VIRTUAL_HOST=
      - VIRTUAL_HOST_ALIAS=
      - LETSENCRYPT_HOST=
