Version 2.1 (#41)
- Add full chapter support (#6) - Add built-in redirect functionality (#39) - Support building Docker containers for release (#38) - Support canonical domain configuration (#37) - Add unit tests for domain/models and integration tests for all three data stores - Convert SQLite storage to use JSON documents, similar to PostgreSQL - Convert admin templates to Giraffe View Engine (from Liquid) - Add .NET 8 support
This commit was merged in pull request #41.
This commit is contained in:
33
src/Dockerfile
Normal file
33
src/Dockerfile
Normal file
@@ -0,0 +1,33 @@
|
||||
FROM mcr.microsoft.com/dotnet/sdk:8.0-alpine AS build
|
||||
WORKDIR /mwl
|
||||
COPY ./MyWebLog.sln ./
|
||||
COPY ./Directory.Build.props ./
|
||||
COPY ./MyWebLog/MyWebLog.fsproj ./MyWebLog/
|
||||
COPY ./MyWebLog.Data/MyWebLog.Data.fsproj ./MyWebLog.Data/
|
||||
COPY ./MyWebLog.Domain/MyWebLog.Domain.fsproj ./MyWebLog.Domain/
|
||||
COPY ./MyWebLog.Tests/MyWebLog.Tests.fsproj ./MyWebLog.Tests/
|
||||
RUN dotnet restore
|
||||
|
||||
COPY . ./
|
||||
WORKDIR /mwl/MyWebLog
|
||||
RUN dotnet publish -f net8.0 -c Release -r linux-x64 --no-self-contained -p:PublishSingleFile=false
|
||||
|
||||
FROM alpine AS theme
|
||||
RUN apk add --no-cache zip
|
||||
WORKDIR /themes/default-theme
|
||||
COPY ./default-theme ./
|
||||
RUN zip -r ../default-theme.zip ./*
|
||||
WORKDIR /themes/admin-theme
|
||||
COPY ./admin-theme ./
|
||||
RUN zip -r ../admin-theme.zip ./*
|
||||
|
||||
FROM mcr.microsoft.com/dotnet/aspnet:8.0-alpine as final
|
||||
WORKDIR /app
|
||||
RUN apk add --no-cache icu-libs
|
||||
ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false
|
||||
COPY --from=build /mwl/MyWebLog/bin/Release/net8.0/linux-x64/publish/ ./
|
||||
COPY --from=theme /themes/*.zip /app/
|
||||
RUN mkdir themes
|
||||
|
||||
EXPOSE 80
|
||||
CMD [ "dotnet", "/app/MyWebLog.dll" ]
|
||||
Reference in New Issue
Block a user