Add deployment files
CI / backend (push) Failing after 2m26s
CI / frontend (push) Failing after 53s

This commit is contained in:
voltsrage
2026-08-11 20:17:53 +08:00
parent a4faf7eadd
commit c871dc4842
24 changed files with 1880 additions and 0 deletions
+23
View File
@@ -0,0 +1,23 @@
# 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 . .
# No VITE_API_URL build-arg needed: src/api/client.ts and src/api/fhirClient.ts
# use relative base URLs ("/api/v1", "/fhir") and rely on the nginx reverse proxy
# below to reach the api container at runtime — same origin in every environment.
RUN npm run build
FROM nginx:1.27-alpine AS runtime
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