summaryrefslogtreecommitdiff
path: root/scripts/server-setup.sh
diff options
context:
space:
mode:
authoryyamashita <yyamashita@hetzner.yyamashita.com>2026-05-17 11:13:50 +0900
committeryyamashita <yyamashita@hetzner.yyamashita.com>2026-05-17 21:52:07 +0900
commit770dfde54e38fe201d5c4bde031c81653e568cda (patch)
treec9ac873325a391fb3428dd3406f63a4e66eb9db3 /scripts/server-setup.sh
parent4ab34c8f0f9b4e1f636a26012f2a75863b471c51 (diff)
Remove inline hook from server-setup.sh; hooks managed by hetzner-infra
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'scripts/server-setup.sh')
-rw-r--r--scripts/server-setup.sh18
1 files changed, 3 insertions, 15 deletions
diff --git a/scripts/server-setup.sh b/scripts/server-setup.sh
index f510fab..efbdc13 100644
--- a/scripts/server-setup.sh
+++ b/scripts/server-setup.sh
@@ -6,24 +6,12 @@ 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@<server-ip>:$REPO_DIR"
-echo " git push hetzner master"
+echo ""
+echo "Then install hooks from hetzner-infra:"
+echo " ssh root@<server-ip> 'bash /app/infra/scripts/install-hooks.sh'"