services:
  patflix:
    image: patflix
    build:
      context: .
      dockerfile: Patflix/Dockerfile
    ports:
      - "6769:8080"
    environment:
      - ASPNETCORE_ENVIRONMENT=Development
      - ASPNETCORE_URLS=http://0.0.0.0:8080
      - ConnectionStrings__DefaultConnection=Server=db;Database=PatflixDb;User Id=sa;Password=PatflixPCTO;TrustServerCertificate=True
    depends_on:
        - db

  db:
    image: mcr.microsoft.com/mssql/server:2022-latest
    container_name: sql_server
    environment:
      - ACCEPT_EULA=Y
      - MSSQL_SA_PASSWORD=PatflixPCTO
    ports:
      - "1433:1433"
    volumes:
      - patflix_data:/var/opt/mssql

volumes:
  patflix_data: