services:
  api_robot:
    build:
      context: ./app
    restart: unless-stopped
    networks:
      - backend_net_robot
    volumes:
      - static_volume:/app/staticfiles

  api_robot1:
    build:
      context: ./app
    restart: unless-stopped
    networks:
      - backend_net_robot
    volumes:
      - static_volume:/app/staticfiles

  api_robot2:
    build:
      context: ./app
    restart: unless-stopped
    networks:
      - backend_net_robot
    volumes:
      - static_volume:/app/staticfiles

  api_robot3:
    build:
      context: ./app
    restart: unless-stopped
    networks:
      - backend_net_robot
    volumes:
      - static_volume:/app/staticfiles

  nginx:
    build:
      context: ./nginx
    restart: unless-stopped
    ports:
      - "8081:80"
    volumes:
      - static_volume:/app/staticfiles
    depends_on:
      - api_robot1
      - api_robot2
      - api_robot3
    networks:
      - backend_net_robot

volumes:
  static_volume:

networks:
  backend_net_robot:
    driver: bridge
