From bd7f6e498416282fd9e6c5242796d84d358a5afe Mon Sep 17 00:00:00 2001 From: Bastien Chanot Date: Sun, 5 Jul 2026 15:31:10 +0200 Subject: [PATCH] =?UTF-8?q?docs(deploy):=20runbook=20style=20=E2=80=94=20o?= =?UTF-8?q?ne=20command=20per=20line,=20session=20style?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .claude/deploy/PROCEDURE.md | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/.claude/deploy/PROCEDURE.md b/.claude/deploy/PROCEDURE.md index 7c8ecd1..2e42754 100644 --- a/.claude/deploy/PROCEDURE.md +++ b/.claude/deploy/PROCEDURE.md @@ -5,15 +5,19 @@ # Static site baked into the nginx image (COPY whitelist): any content or # infra change needs a rebuild; docs/.claude-only deltas skip it. # Front: VPS native nginx (TLS, HSTS) → proxy_pass 127.0.0.1:$PORT → container. +# Style: one command per line, as typed in an interactive session — step 1 opens +# the ssh session, later steps run ON the box; local steps say "(from your machine)". -# 1) pull the desired branch on the VPS (fixed) -ssh "$DEPLOY_HOST" "cd \$APP_DIR && git pull" # VERIFY: HEAD == target sha +# 1) connect + pull the desired branch (fixed) +ssh "$DEPLOY_HOST" +cd "$APP_DIR" +git pull # VERIFY: HEAD == target sha # @delta:rebuild when=index.html,CV_Bastien_Chanot.*,favicon*,apple-touch-icon.png,Dockerfile,docker-compose*.yml,nginx*.conf # 2) rebuild + restart the container (content is baked into the image) -ssh "$DEPLOY_HOST" "cd \$APP_DIR && docker compose up -d --build" # VERIFY: docker compose ps → healthy +docker compose up -d --build # VERIFY: docker compose ps → healthy -# 3) smoke test (fixed) +# 3) smoke test (from your machine) curl -fsS -o /dev/null -w '%{http_code}\n' https://bchanot.fr/ # VERIFY: 200 curl -sI https://bchanot.fr/ | grep -i 'x-content-type-options' # VERIFY: nosniff -# ROLLBACK: ssh "$DEPLOY_HOST" "cd \$APP_DIR && git checkout deploy/ && docker compose up -d --build" +# ROLLBACK: on the VPS — git checkout deploy/ && docker compose up -d --build