|
|
@ -25,21 +25,24 @@ RUN dotnet tool install --global dotnet-ef --version 8.0
|
|
|
|
|
|
|
|
|
|
|
|
ENV PATH="${PATH}:/root/.dotnet/tools"
|
|
|
|
ENV PATH="${PATH}:/root/.dotnet/tools"
|
|
|
|
# Add the migrations
|
|
|
|
# Add the migrations
|
|
|
|
#RUN dotnet ef migrations add --project StubbedContextLib/ --startup-project HeartTrackAPI/ --context StubbedContextLib.TrainingStubbedContext --configuration Debug Initial --output-dir Migrations
|
|
|
|
RUN dotnet-ef migrations add --project StubbedContextLib/StubbedContextLib.csproj --startup-project HeartTrackAPI/HeartTrackAPI.csproj --context StubbedContextLib.TrainingStubbedContext --configuration Debug Initial
|
|
|
|
RUN dotnet ef migrations add --project StubbedContextLib/StubbedContextLib.csproj --startup-project HeartTrackAPI/HeartTrackAPI.csproj --context StubbedContextLib.TrainingStubbedContext --configuration Debug Initial
|
|
|
|
|
|
|
|
# Update the database
|
|
|
|
# Update the database
|
|
|
|
RUN dotnet ef database update --project StubbedContextLib/StubbedContextLib.csproj --startup-project HeartTrackAPI/HeartTrackAPI.csproj --context StubbedContextLib.TrainingStubbedContext --configuration Debug
|
|
|
|
RUN dotnet-ef database update --project StubbedContextLib/StubbedContextLib.csproj --startup-project HeartTrackAPI/HeartTrackAPI.csproj --context StubbedContextLib.TrainingStubbedContext --configuration Debug
|
|
|
|
|
|
|
|
RUN ls HeartTrackAPI/
|
|
|
|
WORKDIR "/src/HeartTrackAPI"
|
|
|
|
WORKDIR "/src/HeartTrackAPI"
|
|
|
|
RUN ls
|
|
|
|
RUN ls
|
|
|
|
|
|
|
|
RUN ls HeartTrackAPI/
|
|
|
|
RUN dotnet build "HeartTrackAPI.csproj" -c $BUILD_CONFIGURATION -o /app/build
|
|
|
|
RUN dotnet build "HeartTrackAPI.csproj" -c $BUILD_CONFIGURATION -o /app/build
|
|
|
|
|
|
|
|
|
|
|
|
FROM build AS publish
|
|
|
|
FROM build AS publish
|
|
|
|
ARG BUILD_CONFIGURATION=Release
|
|
|
|
ARG BUILD_CONFIGURATION=Release
|
|
|
|
RUN dotnet publish "HeartTrackAPI.csproj" -c $BUILD_CONFIGURATION -o /app/publish /p:UseAppHost=false
|
|
|
|
RUN dotnet publish "HeartTrackAPI.csproj" -c $BUILD_CONFIGURATION -o /app/publish /p:UseAppHost=false
|
|
|
|
|
|
|
|
RUN ls
|
|
|
|
FROM base AS final
|
|
|
|
FROM base AS final
|
|
|
|
WORKDIR /app
|
|
|
|
WORKDIR /app
|
|
|
|
COPY --from=publish /app/publish .
|
|
|
|
COPY --from=publish /app/publish .
|
|
|
|
RUN ls -R
|
|
|
|
COPY --from=build /src/uca.HeartTrack.db .
|
|
|
|
|
|
|
|
RUN ls
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
RUN chmod 777 uca.HeartTrack.db
|
|
|
|
ENTRYPOINT ["dotnet", "HeartTrackAPI.dll"]
|
|
|
|
ENTRYPOINT ["dotnet", "HeartTrackAPI.dll"]
|