Skip to content
Snippets Groups Projects
Commit a8cc956c authored by Lucca Santangelo's avatar Lucca Santangelo
Browse files

fix dockerfile static files

parent 89f80464
No related branches found
No related tags found
1 merge request!20merge from develop
Pipeline #10288 passed
......@@ -18,6 +18,7 @@ RUN dotnet publish -c release -o /app/publish
# final stage/image
FROM mcr.microsoft.com/dotnet/core/aspnet:3.1
WORKDIR /app
RUN mkdir /app/StaticFiles
COPY --from=build /app/publish .
EXPOSE 5000
ENTRYPOINT ["dotnet", "Tsi1.Api.dll"]
\ No newline at end of file
......@@ -188,14 +188,14 @@ namespace Tsi1.Api
app.UseAuthorization();
var provider = new FileExtensionContentTypeProvider();
app.UseStaticFiles(new StaticFileOptions()
{
ContentTypeProvider = provider,
FileProvider = new PhysicalFileProvider(
Path.Combine(env.ContentRootPath, "StaticFiles")),
RequestPath = "/static"
}
);
});
app.UseEndpoints(endpoints =>
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment