version: '2.4'
services:
  base:
    environment:
      - COMPOSER_PROCESS_TIMEOUT=1200
    image: mobicoop/php-node-chromium:2.0.0
    volumes:
      - ./:/var/www:delegated
      - ${MOBICOOP_CLIENT:?You forgot to indicate the env MOBICOOP_CLIENT inside bashrc or zshrc}:/var/client:delegated
    working_dir: /var/www
  simlink:
    extends:
      service: base
    working_dir: /var/www/src
    command: ln -s /var/client/src/MobicoopBundle /var/www/src/MobicoopBundle
  install:
    extends:
      service: base
    command: npm install
  install-vendor:
    extends:
      service: base
    entrypoint: bash entrypoint-builder.sh