Skip to content

Commit

Permalink
Publish Migrations
Browse files Browse the repository at this point in the history
  • Loading branch information
strifel committed Jun 29, 2024
1 parent 44fdcc2 commit 7f6172e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,16 @@ FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build-stage

WORKDIR /app

RUN dotnet tool install --global dotnet-ef

RUN ln -s /root/.dotnet/tools/dotnet-ef /usr/local/bin

COPY . .

RUN dotnet publish --self-contained false -p:PublishSingleFile=false

RUN dotnet ef migrations bundle -o DBMigrations

######################
## Production stage ##
######################
Expand All @@ -18,6 +24,8 @@ WORKDIR /app

COPY --from=build-stage /app/bin/Release/net8.0/linux-x64/publish/ /app

COPY --from=build-stage /app/DBMigrations /app/DBMigrations

EXPOSE 8080

CMD ["./GroupOrder"]

0 comments on commit 7f6172e

Please sign in to comment.