Implement /data and /themes directories (#38)

This will allow volumes to be mounted for persistent data/themes
This commit is contained in:
2024-01-05 17:32:38 -05:00
parent 5a3d9f05f8
commit 3226f882a3
5 changed files with 21 additions and 16 deletions

View File

@@ -1,4 +1,4 @@
FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
WORKDIR /mwl
COPY ./MyWebLog.sln ./
COPY ./Directory.Build.props ./
@@ -9,7 +9,7 @@ RUN dotnet restore
COPY . ./
WORKDIR /mwl/MyWebLog
RUN dotnet publish -f net7.0 -c Release -r linux-x64
RUN dotnet publish -f net8.0 -c Release -r linux-x64
FROM alpine AS theme
RUN apk add --no-cache zip
@@ -19,10 +19,11 @@ RUN zip default-theme.zip ./default-theme/*
COPY ./admin-theme ./admin-theme/
RUN zip admin-theme.zip ./admin-theme/*
FROM mcr.microsoft.com/dotnet/aspnet:7.0 as final
FROM mcr.microsoft.com/dotnet/aspnet:8.0 as final
WORKDIR /app
COPY --from=build /mwl/MyWebLog/bin/Release/net7.0/linux-x64/publish/ ./
COPY --from=build /mwl/MyWebLog/bin/Release/net8.0/linux-x64/publish/ ./
COPY --from=theme /themes/*.zip /app/
RUN mkdir data themes
EXPOSE 80
CMD [ "/app/MyWebLog" ]