Align CI/CD with the platform kit: reusable node-ci, job-network sidecars, and capped bake/migrate CD.
CI / changes (push) Successful in 28s
CI / frontend (push) Failing after 0s
CI / backend (push) Failing after 5m16s

This commit is contained in:
2026-09-30 18:18:56 +08:00
parent d90fc13955
commit e2e70fcb3b
10 changed files with 680 additions and 176 deletions
+9 -6
View File
@@ -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.