diff --git a/src/FrontOffice.Main/Dockerfile b/src/FrontOffice.Main/Dockerfile index 09d3d59..db75fe3 100644 --- a/src/FrontOffice.Main/Dockerfile +++ b/src/FrontOffice.Main/Dockerfile @@ -15,24 +15,12 @@ COPY . . WORKDIR "/src/FrontOffice.Main" RUN dotnet publish "FrontOffice.Main.csproj" -c Release -o /app/publish -# Runtime stage - nginx for Blazor WebAssembly -FROM nginx:alpine AS final -WORKDIR /usr/share/nginx/html - -# Remove default nginx files -RUN rm -rf /usr/share/nginx/html/* - -# Copy published wwwroot (Blazor WASM output) -COPY --from=build /app/publish/wwwroot . - -# Configure nginx for SPA routing -RUN echo 'server { \ - listen 80; \ - server_name _; \ - location / { \ - root /usr/share/nginx/html; \ - try_files $uri $uri/ /index.html; \ - } \ -}' > /etc/nginx/conf.d/default.conf +# Runtime stage - aspnet for Blazor Server +FROM mcr.microsoft.com/dotnet/aspnet:9.0 AS runtime +WORKDIR /app +COPY --from=build /app/publish . +ENV ASPNETCORE_URLS=http://+:80 EXPOSE 80 + +ENTRYPOINT ["dotnet", "FrontOffice.Main.dll"]