version: "3.8"
services:
  previewer:
    build:
      context: ./
      target: base-php
    working_dir: "/usr/src/app/scripts/previewer"
    command: [ "php", "-S" ,"0.0.0.0:8080" ]
    ports:
      - "8080:8080"
    environment:
      - BUILDS_DIR=/usr/src/app/builds
      - SOURCES_DIR=/usr/src/app/sources
    volumes:
      - './:/usr/src/app:delegated'
  dumper-pogo:
    build:
      context: ./
      target: dumper-pogo
    command: [ "true" ]
    environment:
      - OUTPUT_DIR=/usr/src/app-build/pogo
    volumes:
      - './build/:/usr/src/app-build:delegated'
      - './scripts/dumper-pogo:/usr/src/app'

  dumper-showdown:
    build:
      context: ./
      target: dumper-showdown
    command: [ "true" ]
    environment:
      - OUTPUT_DIR=/usr/src/app-build/showdown
    volumes:
      - './build/:/usr/src/app-build:delegated'
      - './scripts/dumper-showdown:/usr/src/app'
