services:
  webapi:
    build:
      context: .
      dockerfile: Dockerfile
    ports:
      - "5000:8080"
      - "5001:8081"
    environment:
      - ASPNETCORE_ENVIRONMENT=Development
      - ConnectionStrings__DefaultConnection=Server=sqlserver;Database=iYHCT360Db;User Id=sa;Password=YourStrong!Passw0rd;TrustServerCertificate=True
    depends_on:
      - sqlserver
    networks:
      - app-network

  adminapi:
    build:
      context: .
      dockerfile: Dockerfile.admin
    ports:
      - "5002:8080"
      - "5003:8081"
    environment:
      - ASPNETCORE_ENVIRONMENT=Development
      - ConnectionStrings__DefaultConnection=Server=sqlserver;Database=iYHCT360Db;User Id=sa;Password=YourStrong!Passw0rd;TrustServerCertificate=True
    depends_on:
      - sqlserver
    networks:
      - app-network

  sqlserver:
    image: mcr.microsoft.com/mssql/server:2022-latest
    ports:
      - "1433:1433"
    environment:
      - ACCEPT_EULA=Y
      - SA_PASSWORD=YourStrong!Passw0rd
      - MSSQL_PID=Developer
    volumes:
      - sqlserver-data:/var/opt/mssql
    networks:
      - app-network

volumes:
  sqlserver-data:

networks:
  app-network:
    driver: bridge
