version: '3.4'

services:
  webui:
    image: ${DOCKER_REGISTRY-}webui
    build:
      context: .
      dockerfile: src/WebUI/Dockerfile
    environment:
      - "UseInMemoryDatabase=false"
      - "ConnectionStrings__DefaultConnection=Server=db;Database=CleanArchitectureDb;User=sa;Password=Your_password123;MultipleActiveResultSets=true"
      - "IdentityServer__Key__Type=Development"
      - "ASPNETCORE_Kestrel__Certificates__Default__Password=Your_password123"
      - "ASPNETCORE_Kestrel__Certificates__Default__Path=/https/aspnetapp.pfx"
    volumes:
      - ~/.aspnet/https:/https:ro
    ports:
      - "5000:5000"
      - "5001:5001"
    depends_on:
      - db
    restart: on-failure

  db:
    image: "mcr.microsoft.com/mssql/server"
    environment:
      - "SA_PASSWORD=Your_password123"
      - "ACCEPT_EULA=Y"