Fetch deployment dependencies over localhost SSH with GitHub fallback

This commit is contained in:
TheBadRoger committed 2026-10-15 20:55:25 +08:00
1 parent d4caf05370
commit 959dba988c
7 files changed
+130 -39

No files matched your search

+12
View File
@@ -0,0 +1,12 @@
#!/bin/sh
# Fetch/build external dependencies as deploy, then start Docker Compose as root.
set -eu
PROJECT_ROOT=$(CDPATH= cd -- "$(dirname -- "$0")/.." && pwd)
if [ "$(id -u)" -ne 0 ]; then
echo 'Run with sudo; Git/compilation run as deploy, Docker runs as root.' >&2
exit 1
fi
sudo -H -u deploy python3 "$PROJECT_ROOT/scripts/init-deps.py"
sudo -H -u deploy python3 "$PROJECT_ROOT/scripts/prepare-deploy.py" --build-database
docker compose --env-file "$PROJECT_ROOT/.env" -f "$PROJECT_ROOT/deploy/compose.yaml" up -d --build
printf '%s\n' 'When the database is ready, run the documented db-init command once.'