Introduce spawner app with sandboxing support and client protocol implementation.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
OverlordandClaude Bot committed 2026-10-12 23:49:05 +02:00
1 parent 571f43457d
commit 7b1df2607e
26 files changed
+2438 -5

No files matched your search

+16 -4
View File
@@ -73,15 +73,27 @@ pull_image() {
commit=$(as_owner git rev-parse HEAD)
sandbox_tag="${REGISTRY}/homepage-sandbox:${commit}"
spawner_tag="${REGISTRY}/homepage-spawner:${commit}"
pull_image sandbox_docker "$sandbox_tag"
sandbox_image=$(sandbox_docker image inspect --format '{{index .RepoDigests 0}}' "$sandbox_tag")
pull_image docker "$spawner_tag"
digest() { "$1" image inspect --format '{{index .RepoDigests 0}}' "$2"; }
install -d -m 0755 runtime
# The spawner runs as 10001 and shares group 10100 with the backend.
install -d -m 0755 runtime runtime/status
install -d -o 10001 -g 10100 -m 0750 runtime/spawner
cat > runtime/deploy.env <<EOF
SANDBOX_IMAGE=${sandbox_image}
SANDBOX_IMAGE=$(digest sandbox_docker "$sandbox_tag")
SPAWNER_IMAGE=$(digest docker "$spawner_tag")
SANDBOX_GROUP_ID=$(getent group sandbox-spawner | cut -d: -f3)
STATUS_DIR=${PWD}/runtime/status
EOF
set -a
source runtime/deploy.env
set +a
IMAGE=$sandbox_image deploy/host/verify-sandbox.sh
IMAGE=$SANDBOX_IMAGE deploy/host/verify-sandbox.sh
docker compose --project-directory "$PWD" -f deploy/compose.yml \
--env-file .env --env-file runtime/deploy.env up -d --remove-orphans
echo "deployed ${commit}"