version: '3'
services:
  app1:
    build:
      context: ..
      dockerfile: infrastructure/Dockerfile
    environment:
      - PORT=3004

  app2:
    build:
      context: ..
      dockerfile: infrastructure/Dockerfile
    environment:
      - PORT=3005

  app3:
    build:
      context: ..
      dockerfile: infrastructure/Dockerfile
    environment:
      - PORT=3006

  nginx:
    image: nginx:alpine
    ports:
      - "80:80"
    volumes:
      - ./nginx/default.conf:/etc/nginx/conf.d/default.conf:ro
    depends_on:
      - app1
      - app2
      - app3
