Some housekeeping
This commit is contained in:
parent
a029fa4b48
commit
309b4345f1
@ -1,6 +1,6 @@
|
||||
# syntax=docker/dockerfile:1
|
||||
|
||||
FROM mcr.microsoft.com/dotnet/sdk:6.0-alpine AS build-env
|
||||
FROM mcr.microsoft.com/dotnet/sdk:7.0-alpine AS build-env
|
||||
WORKDIR /app
|
||||
|
||||
# Copy csproj and restore as distinct layers, build
|
||||
@ -25,7 +25,7 @@ RUN npx vite build --emptyOutDir --outDir ../wwwroot
|
||||
WORKDIR /app
|
||||
|
||||
# Build runtime image
|
||||
FROM mcr.microsoft.com/dotnet/aspnet:6.0-alpine
|
||||
FROM mcr.microsoft.com/dotnet/aspnet:7.0-alpine
|
||||
WORKDIR /app
|
||||
COPY --from=build-env /app/out/ ./
|
||||
COPY --from=frontend-build-env /app/wwwroot/ ./wwwroot/
|
||||
|
@ -1,6 +1,7 @@
|
||||
using Lunar.Exchange.Lapis.Data;
|
||||
using Lunar.Exchange.Lapis.Models;
|
||||
using Microsoft.AspNetCore.Authentication.Cookies;
|
||||
using Microsoft.AspNetCore.HttpOverrides;
|
||||
using Microsoft.AspNetCore.Identity;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
@ -67,6 +68,11 @@ builder.Services
|
||||
|
||||
var app = builder.Build();
|
||||
|
||||
app.UseForwardedHeaders(new ForwardedHeadersOptions
|
||||
{
|
||||
ForwardedHeaders = ForwardedHeaders.XForwardedFor | ForwardedHeaders.XForwardedProto
|
||||
});
|
||||
|
||||
{
|
||||
using var scope = app.Services.CreateScope();
|
||||
using var context = scope.ServiceProvider.GetRequiredService<LapisContext>();
|
||||
|
Loading…
Reference in New Issue
Block a user