diff options
| author | yyamashita <yyamashita@hetzner.yyamashita.com> | 2026-05-17 11:13:48 +0900 |
|---|---|---|
| committer | yyamashita <yyamashita@hetzner.yyamashita.com> | 2026-05-17 11:13:48 +0900 |
| commit | fa882598d3ee6bff4e32892a81b6b2712eb8c11d (patch) | |
| tree | 1ecb0a077a4913582ebd170ab6dc1343580d2be4 /scripts/server-setup.sh | |
| parent | cc62d128021ed393f190560297ffaa4a2c259290 (diff) | |
Remove inline hook from server-setup.sh; hooks managed via install-hooks.sh
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'scripts/server-setup.sh')
| -rw-r--r-- | scripts/server-setup.sh | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/scripts/server-setup.sh b/scripts/server-setup.sh index ce2ad87..154c6c7 100644 --- a/scripts/server-setup.sh +++ b/scripts/server-setup.sh @@ -12,28 +12,17 @@ curl -fsSL https://get.docker.com | sh docker network create web || true 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/infra -GIT_WORK_TREE=$APP_DIR git checkout -f -cd $APP_DIR -docker compose up -d -docker compose exec -T caddy caddy reload --config /etc/caddy/Caddyfile -echo "Deploy complete: hetzner-infra" -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:" +echo " ssh root@<server-ip> 'bash /app/infra/scripts/install-hooks.sh'" +echo "" echo "Then run setup scripts for each app:" echo " tokyo-livehouse-events/scripts/server-setup.sh" echo " whois-band/scripts/server-setup.sh" |
