penpot/exporter/scripts/wait-and-start.sh
Andrey Antukh 676701f74c ✨ Move the exports to the queue worker
The exporter becomes a durable-job worker: the shared item and params
contract, the creation command (mixed scope rejected, single-use runs
marked transient), the external job-def, and the worker that consumes
the `:exporter` queue with one management client, serialized beats,
multipart settle and share-aware asset fetches.

The server side it needs lands here too: per-tenant `exporter:<tenant>`
key ids derived from the same secret (the bare legacy id keeps serving
the deployment own tenant), a heartbeat that filters by tenant in its
own write, and the management API with session mint and settle scoped to
the job owner. The artifact upload is multipart-only and confined to the
parser temp areas.

The frontend follows the job on the websocket: milestones, artifact
download and cancel by job id, with the payload validated against the
contract by a test per caller. nginx, devenv and the docs drop the old
exporter endpoint.

AI-assisted-by: deepseek-v4.1-flash
2026-11-04 17:20:22 +00:00

20 lines
632 B
Bash
Executable File

#!/usr/bin/env bash
SCRIPT_DIR=$(dirname $0);
source $SCRIPT_DIR/../../backend/scripts/_env;
if [ -f $SCRIPT_DIR/../../backend/scripts/_env.local ]; then
source $SCRIPT_DIR/../../backend/scripts/_env.local;
fi
# In-container address of the platform edge (nginx). Invariant across
# instances (per-container loopback), so it lives here, not in compose
# or _env; an explicitly exported value always wins.
export PENPOT_INTERNAL_URI="${PENPOT_INTERNAL_URI:-http://localhost:4449}"
bb -i '(babashka.wait/wait-for-port "localhost" 9630)';
bb -i '(babashka.wait/wait-for-path "target/app.js")';
sleep 2;
exec node target/app.js