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
+15 -15
View File
@@ -26,8 +26,10 @@ classifiers = [
# email-validator, jinja2 and httpx — also arrive inside `fastapi[standard]`,
# so those lines look redundant and install nothing extra; they are here so a
# direct import does not rest on somebody else's extra keeping its contents.
# The variant without fastapi-cloud-cli, which brings sentry-sdk and a deploy
# command nothing here runs.
dependencies = [
"fastapi[standard]<1.0.0,>=0.114.2",
"fastapi[standard-no-fastapi-cloud-cli]<1.0.0,>=0.114.2",
"pydantic>2.0",
"pydantic-settings<3.0.0,>=2.2.1",
"sqlmodel<1.0.0,>=0.0.21",
@@ -56,9 +58,6 @@ dependencies = [
# the journal, the worker pipe. Engine-side only: `fluksio-worker` is
# copied onto other people's machines and stays dependency-free.
"orjson>=3.10",
# The `mlp` node, which is registered at boot. Kept out of the extras
# because a data-science environment has it already.
"numpy>=2.2.6",
# The `wren` node runs its model on one BLAS thread, which answers in about
# half the time. Scoped to the call: OPENBLAS_NUM_THREADS would bind every
# other numpy call in the engine too, and only counts before numpy loads.
@@ -94,17 +93,18 @@ dependencies = [
# extra rather than a dependency: csv and jsonl need nothing, and pyarrow is
# tens of megabytes for whoever wants dtypes kept.
parquet = ["pyarrow>=17"]
# What a deployment has and a laptop does not: the device connectors, outbound
# mail and error reporting. The engine, the CLI and every python node work
# without them — `pip install fluksio` in a data-science environment is the
# case this exists for, and lxml and the aiohttp stack are most of its wait.
# Each import is guarded and names this extra. The image installs it.
server = [
"emails<1.0,>=0.6",
"sentry-sdk[fastapi]>=2.20.0",
"aiomqtt>=2.0.0",
"influxdb-client[async]>=1.40.0",
]
# One per feature, so an instance carries only what it talks to. The engine,
# the CLI and every python node work without any of them. Each import is
# guarded and names its extra; the image takes them as EXTRAS=mqtt,influx.
mqtt = ["aiomqtt>=2.0.0"]
influx = ["influxdb-client[async]>=1.40.0"]
# Outbound mail. lxml and its stylesheet inliner are most of this.
email = ["emails<1.0,>=0.6"]
sentry = ["sentry-sdk[fastapi]>=2.20.0"]
# The `mlp` node. A data-science environment has it already.
ml = ["numpy>=2.2.6"]
# All of the above: what a full deployment runs.
server = ["fluksio[mqtt,influx,email,sentry,ml]"]
[project.urls]
Homepage = "https://fluksio.com"