# To execute this docker-compose yml file use docker-compose -f <file_name> up
# Add the "-d" flag at the end for deattached execution
version: "3"
services:
#  selenium-hub:
#    image: selenium/hub:3.11.0-dysprosium
#    container_name: selenium-hub
#    ports:
#      - "4444:4444"
  chrome:
    image: selenium/standalone-chrome-debug:3.11.0-dysprosium
    depends_on:
#      - selenium-hub
      - whitelist-app
#    environment:
#      - HUB_HOST=selenium-hub
#      - HUB_PORT=4444
    volumes:
      - /dev/shm:/dev/shm
    ports:
      - "5900:5900"
      - "4444:4444"

#  firefox:
#    image: selenium/node-firefox-debug:3.11.0-dysprosium
#    depends_on:
#      - selenium-hub
#      - whitelist-app
#    environment:
#      - HUB_HOST=selenium-hub
#      - HUB_PORT=4444
#    volumes:
#      - /dev/shm:/dev/shm

  postgres-localhost:
    image: test-db:latest
    container_name: postgres-localhost
    ports:
      - "15432:5432"

  whitelist-api:
    image: whitelist/test-api:latest
    container_name: whitelist-api
    depends_on:
      - postgres-localhost
    ports:
      - "15000:5000"
    environment:
      - AWS_ACCESS_KEY_ID
      - AWS_SECRET_ACCESS_KEY
      - AWS_DEFAULT_REGION=eu-west-1
      - WL_INIT_SEED_DATA=true

  whitelist-app:
    image: test-app:latest
    container_name: whitelist-app
    depends_on:
      - whitelist-api
    ports:
      - "808:8080"


