From fa882598d3ee6bff4e32892a81b6b2712eb8c11d Mon Sep 17 00:00:00 2001 From: yyamashita Date: Sun, 17 May 2026 11:13:48 +0900 Subject: Remove inline hook from server-setup.sh; hooks managed via install-hooks.sh Co-Authored-By: Claude Sonnet 4.6 --- scripts/server-setup.sh | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) (limited to 'scripts') 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@:$REPO_DIR" echo " git push hetzner master" echo "" +echo "Then install hooks:" +echo " ssh root@ '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" -- cgit v1.2.3