diff --git a/Dockerfile b/Dockerfile index ceff6d4..2262e7d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -18,6 +18,8 @@ RUN dotnet publish "Klustr-api.csproj" -c Release -o /app/publish FROM base AS final WORKDIR /app COPY --from=publish /app/publish . +ENV ASPNETCORE_ENVIRONMENT Production EXPOSE 80 +EXPOSE 443 EXPOSE 8080 ENTRYPOINT ["dotnet", "Klustr-api.dll"] \ No newline at end of file diff --git a/Program.cs b/Program.cs index 104863d..5f06dae 100644 --- a/Program.cs +++ b/Program.cs @@ -109,7 +109,7 @@ // } app.UseCors("default"); -// app.UseHttpsRedirection(); +app.UseHttpsRedirection(); app.MapControllers(); app.MapHub("/chathub");