Rebuild: the edge workers' API in its own service
The node API (leases, hour-long streams, batches of up to 256 MB JSON parsed in-process) shared the web process with the catalog API, Newznab and the web interface; voyager 1 had to make the same split on 2026-10-06. HTTP_ROUTES picks a process's routes (node, public, all by default): compose service node-api (same image, port 3335 on the compose network) serves the workers, web the rest. The workers' COORDINATOR_URL points at node-api; deploy.sh stops edge before recreating node-api. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
34fea342f5
commit
48f4e982f9
5 files changed
+87
-52
No files matched your search
+3
-3
@@ -42,13 +42,13 @@ docker compose build migrate edge
|
||||
echo "== running migrations"
|
||||
docker compose run --rm --no-deps migrate
|
||||
# Only the app services, never postgres. The worker first: one holding a
|
||||
# stream keeps the web server from exiting.
|
||||
# stream keeps the node API from exiting.
|
||||
echo "== recreating app services"
|
||||
docker compose stop edge
|
||||
docker compose up -d --no-deps web coordinator prober
|
||||
docker compose up -d --no-deps node-api web coordinator prober
|
||||
docker compose up -d --no-deps edge
|
||||
echo "$SHA $(date -Is)" >> "$ROOT/deployed.log"
|
||||
# The images this replaced (321 MB each; the root filesystem is the NVMe, with a 10 GB floor).
|
||||
docker image prune -f --filter label=com.docker.compose.project=usenet-rebuild >/dev/null
|
||||
docker compose ps --format '{{.Service}} {{.Status}}' web coordinator prober edge
|
||||
docker compose ps --format '{{.Service}} {{.Status}}' node-api web coordinator prober edge
|
||||
echo "== deployed $SHA"
|
||||
Reference in new issue
Block a user