#!/bin/bash # Run once on the Hetzner VPS (as root) after hetzner-infra setup set -e APP_DIR=/app/whois-band REPO_DIR=/var/git/whois-band.git mkdir -p "$APP_DIR" mkdir -p "$REPO_DIR" git init --bare "$REPO_DIR" cat > "$REPO_DIR/hooks/post-receive" << 'EOF' #!/bin/bash set -e APP_DIR=/app/whois-band GIT_WORK_TREE=$APP_DIR git checkout -f cd $APP_DIR mkdir -p data docker compose up -d --build echo "Deploy complete: whois-band" EOF chmod +x "$REPO_DIR/hooks/post-receive" echo "" echo "Setup complete. On your local machine, run:" echo " git remote add hetzner root@:$REPO_DIR" echo " git push hetzner master"