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.
24 lines
767 B
Bash
Executable File
24 lines
767 B
Bash
Executable File
#!/bin/sh
|
|
# Starts the bundled Redis unless an external one is named, then the command.
|
|
#
|
|
# Redis holds the last value of every message, node state and the work queue,
|
|
# so without it a restart forgets all three. In the background on purpose: its
|
|
# appendonly file is written on every change, so the SIGKILL it gets when the
|
|
# container stops loses nothing that was acknowledged.
|
|
set -e
|
|
|
|
if [ -z "$REDIS_HOST" ]; then
|
|
mkdir -p /data/redis
|
|
redis-server --bind 127.0.0.1 --port 6379 --dir /data/redis \
|
|
--appendonly yes --loglevel warning &
|
|
i=0
|
|
until redis-cli -h 127.0.0.1 ping >/dev/null 2>&1; do
|
|
i=$((i + 1))
|
|
[ "$i" -lt 100 ] || { echo "bundled redis did not start" >&2; exit 1; }
|
|
sleep 0.1
|
|
done
|
|
export REDIS_HOST=127.0.0.1
|
|
fi
|
|
|
|
exec "$@"
|