sciagent code + Gitea Actions CI/CD
CI/CD / backend (push) Failing after 2m8s
CI/CD / frontend (push) Failing after 1m40s
CI/CD / deploy (push) Has been skipped

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Thinh Lam
2026-06-30 09:38:30 +07:00
commit 688fac73e9
1167 changed files with 158244 additions and 0 deletions
+34
View File
@@ -0,0 +1,34 @@
# Production image for the principal-investigator SPA (frontend_investigator).
# Multi-stage: build the minified bundle in the npm workspace, then serve it with nginx.
# The runtime image holds ONLY static files — no Node, no source, no Vite dev server.
#
# Build context = repo ROOT (the npm workspace):
# docker build -f frontend_investigator/Dockerfile.prod -t frontend_investigator .
# ---- build stage ----
FROM node:22-alpine AS build
WORKDIR /app
# Workspace manifests first (layer cache); all four are needed for `npm ci` to resolve.
COPY package.json package-lock.json ./
COPY shared/package.json ./shared/
COPY frontend_user/package.json ./frontend_user/
COPY frontend_admin/package.json ./frontend_admin/
COPY frontend_investigator/package.json ./frontend_investigator/
COPY frontend_publisher/package.json ./frontend_publisher/
RUN npm ci
# Only the sources this app needs: the PI app + the shared kernel (consumed as source).
COPY shared ./shared
COPY frontend_investigator ./frontend_investigator
# Vite production build → /app/frontend_investigator/dist (minified, sourcemap:false).
RUN npm run build -w frontend_investigator
# ---- runtime stage (static only) ----
FROM nginx:1.27-alpine
RUN rm -rf /usr/share/nginx/html/*
COPY frontend_investigator/nginx/default.conf /etc/nginx/conf.d/default.conf
COPY --from=build /app/frontend_investigator/dist /usr/share/nginx/html
EXPOSE 8080
CMD ["nginx", "-g", "daemon off;"]