name: changeback-dev

services:
  # ------------------------------------ API ----------------------------------- #
  admin-api:
    environment:
      - ASPNETCORE_ENVIRONMENT=Development
      - ASPNETCORE_URLS=http://+:80
    networks:
      - external-network
    ports:
      - "5001:80"
    restart: unless-stopped

  customer-api:
    environment:
      - ASPNETCORE_ENVIRONMENT=Development
      - ASPNETCORE_URLS=http://+:80
    networks:
      - external-network
    ports:
      - "5002:80"
    restart: unless-stopped

  partners-api:
    environment:
      - ASPNETCORE_ENVIRONMENT=Development
      - ASPNETCORE_URLS=http://+:80
    networks:
      - external-network
    ports:
      - "5004:80"
    restart: unless-stopped

  portal-api:
    environment:
      - ASPNETCORE_ENVIRONMENT=Development
      - ASPNETCORE_URLS=http://+:80
    networks:
      - external-network
    ports:
      - "5003:80"
    restart: unless-stopped

  webhooks-api:
    environment:
      - ASPNETCORE_ENVIRONMENT=Development
      - ASPNETCORE_URLS=http://+:80
    networks:
      - external-network
    ports:
      - "5004:80"
    restart: unless-stopped

  # ------------------------------------ WEB ----------------------------------- #
  admin-web:
    build:
      args:
        - NODE_BUILD_SCRIPT=build:development
        - NODE_ENV=development
    depends_on:
      - admin-api
    environment:
      TZ: "America/Sao_Paulo"
      PORT: 80
    networks:
      - external-network
    ports:
      - "3001:80"
    restart: unless-stopped

  customer-web:
    build:
      args:
        - NODE_BUILD_SCRIPT=build:development
        - NODE_ENV=development
    depends_on:
      - customer-api
    environment:
      TZ: "America/Sao_Paulo"
      PORT: 80
    networks:
      - external-network
    ports:
      - "3002:80"
    restart: unless-stopped

  portal-web:
    build:
      args:
        - NODE_BUILD_SCRIPT=build:development
        - NODE_ENV=development
    depends_on:
      - customer-api
    environment:
      TZ: "America/Sao_Paulo"
      PORT: 80
    networks:
      - external-network
    ports:
      - "3003:80"
    restart: unless-stopped

networks:
  external-network:
    driver: bridge
