The changes included in this commit are made to refactor the project structure and Docker configurations. Previously, the application was structured around the AllInOneWeb solution, but it has been split into Server.Web and ServerAndStudio.Web solutions for better separation of concerns. Additionally, the Docker configurations have been updated to reflect the new structure, which should streamline the build and deployment process.
25 lines
807 B
Docker
25 lines
807 B
Docker
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:8.0-bookworm-slim AS build
|
|
WORKDIR /source
|
|
|
|
# copy sources.
|
|
COPY src/. ./src
|
|
COPY ./NuGet.Config ./
|
|
COPY *.props ./
|
|
|
|
# restore packages.
|
|
RUN dotnet restore "./src/bundles/Elsa.Server.Web/Elsa.Server.Web.csproj"
|
|
|
|
# build and publish (UseAppHost=false creates platform independent binaries).
|
|
WORKDIR /source/src/bundles/Elsa.AllInOne.Web
|
|
RUN dotnet build "Elsa.Server.Web.csproj" -c Release -o /app/build
|
|
RUN dotnet publish "Elsa.Server.Web.csproj" -c Release -o /app/publish /p:UseAppHost=false --no-restore -f net8.0
|
|
|
|
# move binaries into smaller base image.
|
|
FROM mcr.microsoft.com/dotnet/aspnet:8.0-bookworm-slim AS base
|
|
WORKDIR /app
|
|
COPY --from=build /app/publish ./
|
|
|
|
EXPOSE 80/tcp
|
|
EXPOSE 443/tcp
|
|
ENTRYPOINT ["dotnet", "Elsa.Server.Web.dll"]
|