3 Commits

Author SHA1 Message Date
739ffafedd fixes 2026-05-23 06:42:44 +02:00
e28739f8f1 Fix Tailwind asset build dropping all utility classes in Docker
The Dockerfile asset stage copied only static/src + vite.config.js, never
the HTML templates. Tailwind v4 generates CSS by scanning source files for
class usage, so with no templates present it emitted a stripped CSS with
zero utility classes — breaking layout and ballooning SVG icons (w-5/h-5
no longer applied) on deployed builds.

- main.css: add explicit @source directive for the templates dir so content
  detection no longer depends on the build CWD.
- Dockerfile: copy vergabe_teilnahme/templates into the assets stage so the
  @source path resolves at build time.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-21 00:37:07 +02:00
483a4dfd3b 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>
2026-05-18 23:32:51 +02:00