|
|
@ -28,7 +28,6 @@ ENV PATH="${PATH}:/root/.dotnet/tools"
|
|
|
|
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 dotnet build "HeartTrackAPI.csproj" -c $BUILD_CONFIGURATION -o /app/build
|
|
|
|
RUN dotnet build "HeartTrackAPI.csproj" -c $BUILD_CONFIGURATION -o /app/build
|
|
|
@ -36,14 +35,9 @@ 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
|
|
|
|
|
|
|
|
RUN ls /
|
|
|
|
|
|
|
|
RUN ls /src
|
|
|
|
|
|
|
|
FROM base AS final
|
|
|
|
FROM base AS final
|
|
|
|
WORKDIR /app
|
|
|
|
WORKDIR /app
|
|
|
|
COPY --from=publish /app/publish .
|
|
|
|
COPY --from=publish /app/publish .
|
|
|
|
COPY --from=publish /src/HeartTrackAPI/uca.HeartTrack.db .
|
|
|
|
COPY --from=publish /src/HeartTrackAPI/uca.HeartTrack.db .
|
|
|
|
RUN ls
|
|
|
|
RUN chown $APP_UID:$APP_UID uca.HeartTrack.db
|
|
|
|
|
|
|
|
|
|
|
|
RUN chmod 777 uca.HeartTrack.db
|
|
|
|
|
|
|
|
ENTRYPOINT ["dotnet", "HeartTrackAPI.dll"]
|
|
|
|
ENTRYPOINT ["dotnet", "HeartTrackAPI.dll"]
|