docker might be deleting source code but who knows anymore

This commit is contained in:
Alan Moon 2025-03-18 17:01:57 -07:00
parent 70e441a47e
commit 659ab75693

View File

@ -8,10 +8,6 @@ COPY . .
# Restore dependencies and build the application # Restore dependencies and build the application
RUN dotnet build -c Release -o /app RUN dotnet build -c Release -o /app
# move mods and assets directors from sources to /app
RUN mv src/mods /app && ln -s /app/mods src/
RUN mv src/assets /app && ln -s /app/assets src/
# install ef tools # install ef tools
RUN dotnet tool install --global dotnet-ef --version 7.0.12 RUN dotnet tool install --global dotnet-ef --version 7.0.12
@ -21,6 +17,10 @@ ENV PATH="${PATH}:/root/.dotnet/tools"
# ensure database is in sync with migrations # ensure database is in sync with migrations
RUN dotnet ef database update --project /src/sodoff.csproj RUN dotnet ef database update --project /src/sodoff.csproj
# move mods and assets directors from sources to /app
RUN mv src/mods /app && ln -s /app/mods src/
RUN mv src/assets /app && ln -s /app/assets src/
# Create clean run environment (without source and sdk) # Create clean run environment (without source and sdk)
# FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS base # FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS base
# WORKDIR /app # WORKDIR /app