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
+4 -19
View File
@@ -42,20 +42,6 @@ services:
volumes: !override
- app-flow-data:/data
frontend:
container_name: !reset null
ports: !reset []
# Baked at build time. compose.dev.yml bakes http://localhost:8000, which
# resolves to the playwright container itself; the browser has to reach the
# API by service name on the project network instead.
build:
args:
- VITE_API_URL=http://backend:8000
# Image tags are daemon-global too, and this one no longer holds the same
# bytes as the smoke job's: without a per-job tag the two jobs overwrite
# each other's `fluksio-frontend:latest` and the SPA calls the wrong API.
image: '${DOCKER_IMAGE_FRONTEND?Variable not set}:${COMPOSE_PROJECT_NAME:-ci}'
playwright:
ports: !reset []
# Same reason as backend above. These two exist so a local run leaves its
@@ -64,9 +50,8 @@ services:
# found with the provided path: frontend/blob-report" was. The job copies
# the report out of the container instead.
volumes: !reset []
# frontend/playwright.config.ts defaults baseURL to http://app.localhost,
# which is right for a local run against the integrated stack but resolves
# to 127.0.0.1 in here. In CI the nginx `frontend` service serves the SPA.
# This origin must stay in BACKEND_CORS_ORIGINS (.env.example).
# frontend/playwright.config.ts defaults baseURL to the test stack's
# hostname, which resolves to nothing in here. The backend serves the SPA
# and its API on one origin.
environment:
- PLAYWRIGHT_BASE_URL=http://frontend
- PLAYWRIGHT_BASE_URL=http://backend:8000