Default dependencies to HTTPS with opt-in SSH fallback

This commit is contained in:
TheBadRoger committed 2026-10-15 21:12:36 +08:00
1 parent 959dba988c
commit 1e535c83eb
8 files changed
+49 -55

No files matched your search

+3 -7
View File
@@ -1,12 +1,8 @@
#!/bin/sh
# Fetch/build external dependencies as deploy, then start Docker Compose as root.
# Prepare configured external dependencies, then build and start Docker Compose.
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
python3 "$PROJECT_ROOT/scripts/init-deps.py"
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.'