Files
app/docker/compose.local.yml
T
stroblmeandClaude Opus 5 961a8f881d Keep the engine's state in SQLite, not Postgres
One process owns this database — the image has run a single uvicorn
worker for that reason since the four-engines bug — so a file beside the
flows is the honest shape for it, and it is what lets `fluksio serve`
need no infrastructure at all. Live values, node execution and the work
queue never came here anyway; what does is a rollup a minute at a time,
a row per cascade and the run history, and WAL keeps the readers going
while that one writer works.

DATA_DIR is now the one setting that moves everything an installation
keeps; the rest derive from it and the images still spell theirs out.
The schema is prepared in-process at startup, so the prestart service is
gone, and the ten Postgres-only revisions collapse into one portable
baseline.

Three things only worked because psycopg was casting for us: a token's
subject arriving as a string where the column is a UUID, `greatest`, and
`date_bin`. The timestamps needed a column type of their own — SQLite
stores no offset, and a naive datetime read back either raises against an
aware `now` or serialises as local time.

Postgres stays in the stack only for Umami, behind the analytics profile.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-21 22:19:45 +02:00

47 lines
1.3 KiB
YAML

# Integrated local stack — layered on top of compose.yml + compose.dev.yml by
# the root `make dev`. Reattaches this stack's Traefik to the shared external
# `proxy` network so it also routes the website stack's containers, and serves
# everything over plain http on *.${DOMAIN} (default *.localhost).
# Everything here is reachable through Traefik on *.${DOMAIN}, so the host ports
# compose.dev.yml publishes are dropped: they add nothing and make the whole
# stack fail to start whenever something else on the host already holds one.
services:
proxy:
networks:
- proxy
- default
ports: !override
- "80:80"
db:
ports: !reset []
adminer:
ports: !reset []
mailcatcher:
ports: !reset []
backend:
ports: !reset []
environment:
- ENVIRONMENT=local
- FRONTEND_HOST=http://app.${DOMAIN:-localhost}
# Last entry: the standalone Vite dev server (`make dev-frontend`), which
# talks to this backend rather than running one of its own.
- BACKEND_CORS_ORIGINS=http://${DOMAIN:-localhost},http://app.${DOMAIN:-localhost},http://localhost:5173
frontend:
ports: !reset []
build:
args:
- VITE_API_URL=http://api.${DOMAIN:-localhost}
- NODE_ENV=development
networks:
# Shared with the website stack; created by the root scripts/setup.sh.
proxy:
external: true