summaryrefslogtreecommitdiff
path: root/scripts/server-setup.sh
diff options
context:
space:
mode:
authoryyamashita <yyamashita@hetzner.yyamashita.com>2026-05-17 11:13:49 +0900
committeryyamashita <yyamashita@hetzner.yyamashita.com>2026-05-17 11:22:46 +0900
commitadacc4c7783a47cb75239c67cc0746e6edb70775 (patch)
treedff0f8ebd1e1671a3e779035fc301903e071d7cc /scripts/server-setup.sh
parent00c4851e3a716ee30d435bea20e65af55288da6f (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')
-rwxr-xr-xscripts/server-setup.sh18
1 files changed, 3 insertions, 15 deletions
diff --git a/scripts/server-setup.sh b/scripts/server-setup.sh
index bfcab59..99bef9b 100755
--- a/scripts/server-setup.sh
+++ b/scripts/server-setup.sh
@@ -6,24 +6,12 @@ APP_DIR=/app/tokyo-livehouse-events
REPO_DIR=/var/git/tokyo-livehouse-events.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/tokyo-livehouse-events
-GIT_WORK_TREE=$APP_DIR git checkout -f
-cd $APP_DIR
-mkdir -p data
-docker compose up -d --build
-echo "Deploy complete: tokyo-livehouse-events"
-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'"