version: '3'

services:

  mysql:
    image: gorillajs/mariadb
    expose: 
      - 3306
    volumes:
      - ../template:/root/templates
      - {{docker.data_path}}/{{project.id}}/mysql:/var/lib/mysql
    entrypoint:
      - bin/sh
      - /root/templates/entrypoint-mariadb.sh

  web:
    image: gorillajs/wordpress
    ports:  
      - "{{docker.port}}:80"
    volumes:
      - ../template:/root/templates
      - ../../application:/var/www/{{project.domain}}/application
    entrypoint:
      - bin/sh
      - /root/templates/entrypoint-web.sh
    container_name: {{project.domain}}

networks:
  default:
    external:
      name: gorillajs

