Files
vigilcare-records/vigilcare-records-web/Dockerfile
T
Trent 5a175e3fba
CI / changes (push) Successful in 1m4s
CI / backend (push) Failing after 0s
CI / frontend (push) Failing after 0s
Align CI/CD with shared infra/ci-workflows and drop compose-based CI.
Replace hand-rolled jobs with @v1 callers, capped bake/migrate CD, and remove the docker-compose.ci.yml bridge workaround.
2026-10-06 19:10:58 +08:00

25 lines
857 B
Docker

# Build context is vigilcare-records-web/ (package.json, nginx.conf live here):
# docker build -f vigilcare-records-web/Dockerfile -t vigilcare-records-dashboard vigilcare-records-web
FROM node:22-alpine AS build
WORKDIR /app
COPY package.json package-lock.json ./
RUN npm ci
COPY . .
# Typecheck runs in CI (npm run typecheck). Image build is vite only.
# No VITE_API_URL build-arg: src/api/client.ts and src/api/fhirClient.ts use
# relative base URLs ("/api/v1", "/fhir"); nginx reverse-proxies to the api
# container — same origin in every environment.
RUN npx vite build
FROM nginx:1.27-alpine AS final
COPY nginx.conf /etc/nginx/conf.d/default.conf
COPY --from=build /app/dist /usr/share/nginx/html
HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 \
CMD wget -qO- http://localhost:80/ >/dev/null || exit 1
EXPOSE 80