version: "2"

services:
  php:
    container_name: phpunit_open_loyalty_backend
    build:
      context: '../'
      dockerfile: './docker/dev/php/fpm-dockerfile'
    links:
      - db
      - elk
      - mail
    volumes:
        - '../backend:/var/www/openloyalty'
    env_file:
        - .env
  elk:
    container_name: phpunit_open_loyalty_elk
    build:
      context: '../'
      dockerfile: './docker/base/elasticsearch-dockerfile'
  db:
    container_name: phpunit_open_loyalty_db
    image: postgres:9
    env_file:
        - .env
  mail:
    container_name: phpunit_open_loyalty_mail
    image: mailhog/mailhog
