FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base WORKDIR /app EXPOSE 7860 ENV ASPNETCORE_URLS=http://0.0.0.0:7860 ENV ConnectionStrings__DefaultConnection="Host=aws-0-eu-central-1.pooler.supabase.com;Port=5432;Database=postgres;Username=postgres.hpbtdersdvvpxrkmhbfe;Password=009988Ppooii@@@@" ENV JWT__KEY="YourSecretKey123!@#$%^&*()+=-0987654321" ENV JWT__ISSUER="your-issuer" ENV JWT__AUDIENCE="your-audience" ENV DB_HOST="aws-0-eu-central-1.pooler.supabase.com" ENV DB_PORT="5432" ENV DB_NAME="postgres" ENV DB_USER="postgres.hpbtdersdvvpxrkmhbfe" ENV DB_PASSWORD="009988Ppooii@@@@" FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build WORKDIR /src COPY ["Backend.csproj", "./"] RUN dotnet restore "Backend.csproj" COPY . . # Install EF Core tools RUN dotnet tool install --global dotnet-ef ENV PATH="${PATH}:/root/.dotnet/tools" ENV ConnectionStrings__DefaultConnection="Host=aws-0-eu-central-1.pooler.supabase.com;Port=5432;Database=postgres;Username=postgres.hpbtdersdvvpxrkmhbfe;Password=009988Ppooii@@@@" ENV JWT__KEY="YourSecretKey123!@#$%^&*()+=-0987654321" ENV JWT__ISSUER="your-issuer" ENV JWT__AUDIENCE="your-audience" # Create migrations RUN dotnet ef migrations add InitialMigration --project Backend.csproj # RUN dotnet ef database update RUN dotnet build "Backend.csproj" -c Release -o /app/build FROM build AS publish RUN dotnet publish "Backend.csproj" -c Release -o /app/publish FROM base AS final WORKDIR /app COPY --from=publish /app/publish . # Copy migrations from build stage COPY --from=build /src/Migrations ./Migrations COPY --from=build /src/*.db ./ # Create and run the entrypoint script COPY <