Layered: routes -> services -> repositories -> db, over PostgreSQL 18 with split roles (findr_migrator for DDL, findr_app for DML). Keycloak JWT auth with per-endpoint scope guards. Drizzle migrations run with the DDL role at container start. Pick-by-light: one ESP32 controller drives one WS2812 chain through several boxes; each box owns a contiguous LED slice. MQTT contract in src/lib/mqtt-topics.ts / docs/mqtt.md. /v1/pick controls light/idle/off and /v1/boxes + /v1/controllers manage the strip mapping. Reference resource /v1/parts wired end to end. Vitest, Biome, multi-stage Dockerfile, local compose.yml with Postgres. Signed-off-by: Peter Siegmund <mars3142@noreply.mars3142.dev>
33 lines
1.2 KiB
YAML
33 lines
1.2 KiB
YAML
name: findr-api-dev
|
|
|
|
services:
|
|
postgres:
|
|
# Debian-based image on purpose: the Alpine variant is musl/libc-minimal and
|
|
# only ships C/POSIX libc locales, so linguistic sorting of German text is
|
|
# wrong. This image + the ICU locale provider below gives correct ordering
|
|
# and matches what runs in production on mars3142-01.
|
|
image: postgres:18
|
|
restart: unless-stopped
|
|
environment:
|
|
POSTGRES_USER: postgres
|
|
POSTGRES_PASSWORD: ${POSTGRES_SUPERUSER_PASSWORD:-postgres}
|
|
POSTGRES_DB: findr
|
|
# ICU for collation, C.UTF-8 for the libc-side lc_ctype/lc_messages.
|
|
POSTGRES_INITDB_ARGS: "--locale-provider=icu --icu-locale=de-DE --locale=C.UTF-8 --encoding=UTF8"
|
|
FINDR_MIGRATOR_PASSWORD: ${FINDR_MIGRATOR_PASSWORD:-findr_migrator}
|
|
FINDR_APP_PASSWORD: ${FINDR_APP_PASSWORD:-findr_app}
|
|
ports:
|
|
- "${POSTGRES_PORT:-5432}:5432"
|
|
volumes:
|
|
# Postgres 18+ images: mount the parent dir, not /var/lib/postgresql/data.
|
|
- findr-pgdata:/var/lib/postgresql
|
|
- ./db/init:/docker-entrypoint-initdb.d:ro
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U postgres -d findr"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 10
|
|
|
|
volumes:
|
|
findr-pgdata:
|