Update src/BackOffice/Dockerfile
All checks were successful
Build and Deploy / build (push) Successful in 4m8s

This commit is contained in:
2025-12-07 22:27:45 +00:00
parent 59d9a0644a
commit 200825064a

View File

@@ -7,18 +7,11 @@ COPY . .
WORKDIR "/src/BackOffice" WORKDIR "/src/BackOffice"
RUN dotnet publish "./BackOffice.csproj" -c Release -o /app/publish RUN dotnet publish "./BackOffice.csproj" -c Release -o /app/publish
FROM nginx:alpine AS final
WORKDIR /usr/share/nginx/html
COPY --from=build /app/publish/wwwroot .
COPY <<'NGINX_CONF' /etc/nginx/conf.d/default.conf
server {
listen 80;
server_name _;
location / { FROM mcr.microsoft.com/dotnet/aspnet:9.0 AS runtime
root /usr/share/nginx/html; WORKDIR /app
try_files $uri $uri/ /index.html; COPY --from=build /app/publish .
} ENV ASPNETCORE_URLS=http://+:8080
} EXPOSE 8080
NGINX_CONF ENTRYPOINT ["dotnet", "BackOffice.dll"]
EXPOSE 80