Multi-stage images: web (workspace build baked into unprivileged nginx with SPA fallback, asset caching, /healthz) and api (pnpm deploy bundle with the prisma CLI for migrate-on-start, non-root, node-based healthcheck). deploy/compose/docker-compose.yml defines the stage stack (web, api, db) with frontend/internal networks, localhost-only published ports for the host reverse proxy, log rotation, and named volumes; .env.example documents every variable. compose.dev.yml layers hot-reloading dev containers (or database-only usage) over the same definition. Verified locally: full stack healthy, SPA fallback, readyz green after automatic migration, db not reachable from outside. Closes #6 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
27 lines
1.0 KiB
Plaintext
27 lines
1.0 KiB
Plaintext
# Dorfteich stage configuration. Copy to `.env` (mode 600, never in git)
|
|
# next to docker-compose.yml and adjust the values.
|
|
|
|
# --- required ---------------------------------------------------------------
|
|
# PostgreSQL password for the `dorfteich` database user.
|
|
POSTGRES_PASSWORD=change-me
|
|
|
|
# --- images -----------------------------------------------------------------
|
|
# Image name prefix. Stages pull from the Gitea registry, e.g.
|
|
# gitea.101010.cloud/stwaidele/dorfteich — local builds use the default.
|
|
IMAGE_PREFIX=dorfteich
|
|
# Image tag to run: a git SHA, `test`, `int`, or a release tag like v1.2.0.
|
|
TAG=latest
|
|
|
|
# --- ports (localhost only; the host reverse proxy routes to these) ---------
|
|
# Suggested per stage on the shared VPS: test 8100/8101, int 8110/8111,
|
|
# prod 8120/8121.
|
|
WEB_PORT=8100
|
|
API_PORT=8101
|
|
|
|
# --- behavior ----------------------------------------------------------------
|
|
# pino log level: fatal|error|warn|info|debug|trace
|
|
LOG_LEVEL=info
|
|
|
|
# Compose project name; set per stage (dorfteich-test, dorfteich-int, …).
|
|
COMPOSE_PROJECT_NAME=dorfteich
|