summaryrefslogtreecommitdiff
path: root/Dockerfile
diff options
context:
space:
mode:
authorSergey Chebotar <s.chebotar@gmail.com>2023-03-10 07:43:00 +0300
committerSergey Chebotar <s.chebotar@gmail.com>2023-03-10 07:43:00 +0300
commit5eff87dd115966b9fe1b3981805300e26a8f94c2 (patch)
tree62a6080c47fa3b74dcaa0fd668fd317c8252b51e /Dockerfile
parent389f98e1d3cf191f2862be7f67e94529143a0765 (diff)
Docker changes
Diffstat (limited to 'Dockerfile')
-rw-r--r--Dockerfile5
1 files changed, 4 insertions, 1 deletions
diff --git a/Dockerfile b/Dockerfile
index a2622e2..183e8d9 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -5,12 +5,15 @@ COPY . ./
RUN dotnet restore
RUN dotnet tool restore
RUN dotnet libman restore
-RUN dotnet ef database update
+RUN dotnet ef database update --context DataContext
+RUN dotnet ef database update --context IdentityContext
+
RUN dotnet publish -c Release -o out
FROM mcr.microsoft.com/dotnet/aspnet:6.0
EXPOSE 5000
WORKDIR /app
COPY --from=build /app/out .
+COPY --from=build /app/Database ./Database
ENV ASPNETCORE_ENVIRONMENT Production
ENTRYPOINT [ "dotnet", "MyDarling.dll", "--urls=http://0.0.0.0:5000" ] \ No newline at end of file