# Painless development and deployment with Docker. Development overrides.
# Visit the docs at https://docs.docker.com/compose/extends/

version: '3'

services:
  application:
    build:
      context: .
      dockerfile: ./config/webserver/Dockerfile
    env_file: .env
    volumes:
      - .:/var/www/html

  composer:
    image: painless/composer
    user: "${LOCAL_UID:-1001}:${LOCAL_GID:-1001}"
    env_file: .env
    volumes:
      - .:/var/www/html
    working_dir: /var/www/html

  npm:
    image: painless/npm
    volumes:
      - .:/var/www/html
{% if cookiecutter.database == 'Postgres' %}
  database:
    # Make database accessible on localhost during development
    # If you use docker-machine configure port forwarding in addition!
    ports:
      - '5432:5432'
{%- elif cookiecutter.database == 'MySQL/MariaDB' %}
  database:
    # Make database accessible on localhost during development
    # If you use docker-machine configure port forwarding in addition!
    ports:
      - '3306:3306'
{% endif -%}

# Painless development and deployment with Docker. Development overrides.
# Visit the docs at https://docs.docker.com/compose/extends/

version: '3'

services:
  application:
    build:
      context: .
      dockerfile: ./config/webserver/Dockerfile
    env_file: .env
    volumes:
      - .:/var/www/html

  composer:
    image: painless/composer
    user: "${LOCAL_UID:-1001}:${LOCAL_GID:-1001}"
    env_file: .env
    volumes:
      - .:/var/www/html
    working_dir: /var/www/html

  npm:
    image: painless/npm
    volumes:
      - .:/var/www/html

  gulp:
    image: painless/npm
    volumes:
      - .:/var/www/html
    environment:
      - ENTRYPOINT='npm run gulp'
{% if cookiecutter.database == 'Postgres' %}
  database:
    # Make database accessible on localhost during development
    # If you use docker-machine configure port forwarding in addition!
    ports:
      - '5432:5432'
{%- elif cookiecutter.database == 'MySQL/MariaDB' %}
  database:
    # Make database accessible on localhost during development
    # If you use docker-machine configure port forwarding in addition!
    ports:
      - '3306:3306'
{% endif -%}

Add Gulp pseudo service for docker-compose (PHP)
Add Gulp pseudo service for docker-compose (PHP)
