Align CI/CD with the platform kit: reusable node-ci, job-network sidecars, and capped bake/migrate CD.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
# Multi-stage API image + EF migration bundle.
|
||||
# docker build -f VigilCareClinicalAPI/Dockerfile . → runtime (default)
|
||||
# docker build -f VigilCareClinicalAPI/Dockerfile --target migrate . → /out/migrate-api
|
||||
# docker build -f VigilCareClinicalAPI/Dockerfile . → final (default)
|
||||
# docker build -f VigilCareClinicalAPI/Dockerfile --target migrate-bundle . → scratch + /out/migrate-api
|
||||
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS src
|
||||
WORKDIR /src
|
||||
|
||||
@@ -34,9 +34,7 @@ RUN sed -i \
|
||||
-e 's/"RunnerPassword": "[^"]*"/"RunnerPassword": ""/' \
|
||||
/app/publish/appsettings.json
|
||||
|
||||
# Self-contained EF bundle for CD (docker build --target migrate).
|
||||
# Prefer docker build over docker run -v on act_runner — bind mounts resolve
|
||||
# on the Docker host, not the job workspace.
|
||||
# Self-contained EF bundle for CD bake target migrate.
|
||||
FROM src AS migrate
|
||||
RUN dotnet tool install --global dotnet-ef --version 8.0.4 \
|
||||
&& export PATH="$PATH:/root/.dotnet/tools" \
|
||||
@@ -49,7 +47,12 @@ RUN dotnet tool install --global dotnet-ef --version 8.0.4 \
|
||||
--output /out/migrate-api \
|
||||
--force
|
||||
|
||||
FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS runtime
|
||||
# Scratch extract stage — CMD required for bare `docker create` after bake.
|
||||
FROM scratch AS migrate-bundle
|
||||
COPY --from=migrate /out/migrate-api /out/migrate-api
|
||||
CMD ["/out/migrate-api"]
|
||||
|
||||
FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS final
|
||||
WORKDIR /app
|
||||
|
||||
# curl is required by the container healthcheck; the aspnet image does not ship it.
|
||||
|
||||
Reference in New Issue
Block a user