Files
shayandClaude Opus 5.5 74a8146779 feat(deploy): log one access line per request to stdout
Each gunicorn service (edge, fetcher, generator) now writes a request line
("GET /x HTTP/1.1" 200 12ms) to stdout, which Pantheos ingests for request
logs and rps / 5xx / p95. /metrics and /health are left out.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 10:50:32 -04:00

29 lines
810 B
Docker

# --- stage 1: build the React SPA ---
FROM node:20-alpine AS frontend-build
WORKDIR /app/frontend
COPY frontend/package.json frontend/package-lock.json ./
RUN npm ci
COPY frontend/ ./
ARG VITE_GENERATOR_URL=""
ARG VITE_EDGE_URL=""
ENV VITE_GENERATOR_URL=$VITE_GENERATOR_URL
ENV VITE_EDGE_URL=$VITE_EDGE_URL
RUN npm run build
# --- stage 2: python runtime ---
FROM python:3.11-slim AS runtime
WORKDIR /app
COPY requirements.txt ./
RUN pip install --no-cache-dir -r requirements.txt
COPY src ./src
COPY gunicorn.conf.py ./
RUN mkdir -p /app/src/static /app/data
COPY --from=frontend-build /app/frontend/dist/ /app/src/static/
EXPOSE 5002
ENV GENERATOR_SETTINGS_DB_PATH=/app/data/settings.db
ENV GENERATOR_WIDGETS_DB_PATH=/app/data/widgets.db
CMD ["gunicorn", "-b", "0.0.0.0:5002", "-w", "2", "src.api:app"]