version: '2'

services:
  nginx:
    image: phundament/nginx-one:1.9
    volumes_from:
      - phpfpm
    ports:
      - '80'
    depends_on:
      - phpfpm

  phpfpm:
    image: phundament/app:4.2.0-rc2
    working_dir: /app/vendor/dmstr/yii2-helpers
    depends_on:
      - mariadb
      - seleniumfirefox
    environment:
      APP_NAME: dmstr-helpers
      APP_TITLE: 'dmstr/yii2-helpers'
      YII_ENV: 'prod'
      YII_DEBUG: 'false'
      DB_PORT_3306_TCP_ADDR: mariadb
      DB_PORT_3306_TCP_PORT: 3306
      DB_ENV_MYSQL_ROOT_USER: root
      DB_ENV_MYSQL_ROOT_PASSWORD: secretadmin
    volumes:
      - /app
      - ../:/app/vendor/dmstr/yii2-helpers
      #- ../tests/_config/local.php:/app/src/config/local.php

  mariadb:
    image: 'percona:5.7'
    ports:
      - '3306'
    environment:
      MYSQL_ROOT_PASSWORD: secretadmin

  seleniumfirefox:
    image: 'selenium/standalone-firefox-debug:2.47.1'
    expose:
        - '4444'
    ports:
        - '5900'
