docker will now build the migration bundle

This commit is contained in:
James Tombleson 2023-06-23 20:19:31 -07:00
parent a6ea89be62
commit f2995ff156

View File

@ -14,21 +14,20 @@ FROM build AS publish
RUN dotnet publish -c Release -o /app/publish
RUN dotnet publish -o build
#--self-contained true -p:PublishSingleFile=true -p:IncludeNativeLibrariesForSelfExtract=true
RUN ls build
FROM build as ef
RUN dotnet tool install dotnet-ef --tool-path /usr/bin
RUN dotnet ef migrations bundle --project "Newsbot.Collector.Database"
FROM mcr.microsoft.com/dotnet/aspnet:7.0.3 as app
ENV ASPNETCORE_URLS=http://*:5000
ENV DOTNET_URLS=http://*:5000
#RUN apt-get install chromium -y
WORKDIR /app
#RUN mkdir /migrations
COPY --from=publish /app/build /app
#COPY --from=build ./app/Newsbot.Collector.Database/Migrations /app/migrations
#COPY --from=goose /go/bin/goose /app
COPY --from=ef /app/efbundle /app
CMD [ "dotnet", "Newsbot.Collector.Api.dll" ]