One image for the whole app: engine, API and dashboard on one port

The backend image now builds the SPA and serves it on the API's own origin
(fluksio/spa.py), so an instance is a single container with no proxy, DNS,
port 80 or .env: `docker compose up -d` with the new compose.yml runs it on
localhost:8080. It starts on fluksio serve (persisted secret key, first
admin printed once) and brings its own Redis when REDIS_HOST is unset.

Slimmer: python:3.13-slim, no dev group, uv once, fastapi without the cloud
CLI. Optional features are per-feature extras (mqtt, influx, email, sentry,
ml, server for all) picked with the EXTRAS build argument; numpy moved to
`ml`. ffmpeg left the image for imageio-ffmpeg via the Modules screen.

The operator stack runs the same image with app. and api. routed to it; the
nginx frontend service, the LAN nginx proxy and DOMAIN in the backend are
gone, and the MCP issuer is FRONTEND_HOST.
This commit is contained in:
2026-10-16 11:40:02 +02:00
parent 9d9dac0bd0
commit dea25ec08d
39 changed files with 573 additions and 728 deletions
+16 -5
View File
@@ -4,8 +4,8 @@ Fluksio is a node-based automation software that brings trust and reliability to
It just works and looks good.
The core of Fluksio: a node-based, test-driven automation software built to scale. This
repo holds the FastAPI backend, the flow engine, and the dashboard SPA. It is served on
`app.${DOMAIN}` (SPA) and `api.${DOMAIN}` (API)
repo holds the FastAPI backend, the flow engine, and the dashboard SPA, built into one
image that serves all three on one port.
## Layout
@@ -16,7 +16,8 @@ backend/ FastAPI + SQLModel + Alembic + SQLite
worker/ the `fluksio-worker` distribution: the agent and the node runner
frontend/ React 19 + TanStack Router + Tailwind 4 + shadcn/ui
docs/ the public documentation site (zensical), served on docs.${DOMAIN}
docker/ compose.yml → compose.dev.yml → compose.local.yml (+ compose.traefik.yml)
compose.yml the single container, as the getting-started guide runs it
docker/ the operator stack: compose.yml → compose.dev.yml → compose.local.yml (+ compose.traefik.yml)
scripts/ generate-client.sh, test.sh
```
@@ -48,11 +49,21 @@ FLUKSIO_WORKER_TOKEN=… fluksio-worker --url wss://api.fluksio.com/api/v1/worke
## Getting started
Needs Docker, `make` and `openssl`. Port 80 must be free.
Needs Docker with Compose v2.
```sh
docker compose up -d # http://localhost:8080
docker compose logs fluksio # the admin password, printed once
```
Optional features (MQTT, InfluxDB, mail, …) are build-time extras; see `EXTRAS` in
`compose.yml`.
For development, with hot reload behind Traefik on port 80 (also needs `make` and `openssl`):
```sh
make init # once: .env with generated secrets, `proxy` network, prints the admin login
make dev-local # full stack at http://app.localhost (API at http://api.localhost)
make dev-local # full stack at http://app.localhost
make down # stop it
```