Add production Dockerfiles and nginx config

Backend: installs non-editable, runs uvicorn without reload.
Frontend: multi-stage build, serves static files via nginx with
API proxy to the backend service and SPA fallback routing.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-09 18:00:28 +01:00
parent d9d547ef53
commit fd23d89e71
6 changed files with 70 additions and 3 deletions

19
backend/Dockerfile.prod Normal file
View File

@@ -0,0 +1,19 @@
# Production Dockerfile for the backend API
FROM python:3.14-slim
WORKDIR /app
# Install system dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
curl \
&& rm -rf /var/lib/apt/lists/*
# Install Python dependencies
COPY pyproject.toml README.md alembic.ini ./
COPY src/ ./src/
RUN pip install --no-cache-dir .
EXPOSE 8000
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000", "--app-dir", "src"]