Add multi-stage Dockerfile for container deployment

Three-stage build:
- assets: Node 22 + Vite + Tailwind CSS 4 → static/dist/main.css
- python-deps: uv sync --frozen --no-dev against pyproject + uv.lock,
  with the issue-core path dependency satisfied via a BuildKit
  named context (--build-context issue-core=...)
- runtime: python:3.12-slim-bookworm + libpq5 + curl, non-root 'app'
  user, collectstatic at build time, gunicorn on :8000,
  /health/ HEALTHCHECK every 30s

Adds gunicorn>=22 to project dependencies (was missing).

Build:
  docker build --build-context issue-core=/home/worsch/issue-core \
    -t gitea.coulomb.social/coulomb/vergabe-teilnahme:<tag> .

Smoke-verified: container reports (healthy) and /health/ returns
{"status": "ok"} without a database connection.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-05-18 23:32:51 +02:00
parent 17f511fbcd
commit 483a4dfd3b
4 changed files with 133 additions and 0 deletions

View File

@@ -11,6 +11,7 @@ dependencies = [
"python-decouple>=3.8",
"dj-database-url>=2.1",
"issue-core @ file:///home/worsch/issue-core",
"gunicorn>=22.0",
]
[dependency-groups]