Dockerfiles and Compose stack for web, api, and db #6

Closed
opened 2026-07-04 14:51:58 +02:00 by fable-5 · 0 comments
Collaborator

Context

One Compose definition serves all stages and self-hosters (deployment.md).

Scope

Write production Dockerfiles: web (multi-stage: build SPA → nginx with SPA fallback + /healthz), api (multi-stage, non-root user, migrate deploy on start). Create deploy/compose/docker-compose.yml (web, api, db; frontend/internal networks; named volumes; healthchecks; restart: unless-stopped), .env.example documenting every variable, and compose.dev.yml overlay (source mounts, vite dev server, exposed db port). Document reverse-proxy routing expectations (WebSocket note for later /collab).

Acceptance criteria

  • docker compose -f docker-compose.yml -f compose.dev.yml up gives a working dev environment with hot reload
  • production compose runs the built images; docker compose ps shows all services healthy
  • db and future internal services are not reachable from outside the Docker network
  • images run as non-root; web image serves gzip'd assets

Technical notes

  • deployment.md (service table, networks, volumes), operations.md (healthchecks, log rotation options).
  • Pin base images. Keep the stack layout compatible with the LEISINGER host convention (compose + .env in the stage dir, bulk data on RAID bind mounts).

Dependencies

Depends on #2, #3, #4.

Size: ~1.5 days


Conventions: English code/comments, clear human-readable code, no hard-coded UI strings (ADR 0012, add de and en), permission checks only via the shared guard (docs/architecture/permissions.md). Read the referenced ADRs before starting.

## Context One Compose definition serves all stages and self-hosters (deployment.md). ## Scope Write production Dockerfiles: `web` (multi-stage: build SPA → nginx with SPA fallback + `/healthz`), `api` (multi-stage, non-root user, `migrate deploy` on start). Create `deploy/compose/docker-compose.yml` (web, api, db; `frontend`/`internal` networks; named volumes; healthchecks; `restart: unless-stopped`), `.env.example` documenting every variable, and `compose.dev.yml` overlay (source mounts, vite dev server, exposed db port). Document reverse-proxy routing expectations (WebSocket note for later `/collab`). ## Acceptance criteria - [ ] `docker compose -f docker-compose.yml -f compose.dev.yml up` gives a working dev environment with hot reload - [ ] production compose runs the built images; `docker compose ps` shows all services healthy - [ ] db and future internal services are not reachable from outside the Docker network - [ ] images run as non-root; web image serves gzip'd assets ## Technical notes - deployment.md (service table, networks, volumes), operations.md (healthchecks, log rotation options). - Pin base images. Keep the stack layout compatible with the LEISINGER host convention (compose + .env in the stage dir, bulk data on RAID bind mounts). ## Dependencies Depends on #2, #3, #4. **Size**: ~1.5 days --- *Conventions: English code/comments, clear human-readable code, no hard-coded UI strings (ADR 0012, add `de` **and** `en`), permission checks only via the shared guard (docs/architecture/permissions.md). Read the referenced ADRs before starting.*
fable-5 added this to the M0 — Walking skeleton milestone 2026-07-04 14:51:58 +02:00
fable-5 added the
deployment
label 2026-07-04 14:51:58 +02:00
Sign in to join this conversation.
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: stwaidele/dorfteich#6
No description provided.