Skip to content

Commit

Permalink
Fix volume permissions
Browse files Browse the repository at this point in the history
I love docker
  • Loading branch information
PJB3005 committed Aug 1, 2024
1 parent 4b501a4 commit eac6bf8
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base

# Make volume dirs
RUN for DIR in /database /manifest /builds; do mkdir $DIR; chown app: $DIR; done

USER $APP_UID
WORKDIR /app
EXPOSE 8080
Expand All @@ -19,9 +23,9 @@ FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "Robust.Cdn.dll"]
VOLUME /database
ENV CDN__DatabaseFileName=/database/content.db
VOLUME /manifest
ENV Manifest__DatabaseFileName=/manifest/manifest.db
VOLUME /builds

VOLUME /database /manifest /builds

ENV Manifest__FileDiskPath=/builds
ENV Manifest__DatabaseFileName=/manifest/manifest.db
ENV CDN__DatabaseFileName=/database/content.db

0 comments on commit eac6bf8

Please sign in to comment.