chore(devops): patient web app in docker compose — the jury needs only Docker
CI / ruff · pytest (pull_request) Successful in 2m34s

Requirement: no extra software beyond the regulated set. The web app is built in a Node stage and served by
nginx (:8080, /api → app, SSE unbuffered); the server override keeps it off (host nginx serves the bundle).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-05 13:40:24 +03:00
co-authored by Claude Opus 5.5
parent 499cf6cdfc
commit 1eb0f47823
7 changed files with 50 additions and 4 deletions
+3
View File
@@ -0,0 +1,3 @@
node_modules
dist
.vite
+12
View File
@@ -0,0 +1,12 @@
# Patient web app: build with Node in a throwaway stage, serve the static bundle with nginx (+ /api → app).
# The jury only needs Docker: `make up` builds and starts it (http://localhost:8080).
FROM node:20-alpine AS build
WORKDIR /w
COPY package.json package-lock.json ./
RUN npm ci --no-audit --no-fund
COPY . .
RUN npm run build
FROM nginx:1.27-alpine
COPY nginx.conf /etc/nginx/conf.d/default.conf
COPY --from=build /w/dist /usr/share/nginx/html
+18
View File
@@ -0,0 +1,18 @@
# Same-origin API: the app calls /api/v1/... — proxied to the FastAPI container (SSE streaming unbuffered).
server {
listen 80;
root /usr/share/nginx/html;
index index.html;
location / {
try_files $uri $uri/ /index.html;
}
location /api/ {
proxy_pass http://app:8000;
proxy_set_header Host $host;
proxy_http_version 1.1;
proxy_buffering off;
proxy_read_timeout 120s;
}
}