summaryrefslogtreecommitdiff
path: root/git
diff options
context:
space:
mode:
authoryyamashita <yyamashita@hetzner.yyamashita.com>2026-11-01 09:11:31 +0900
committeryyamashita <yyamashita@hetzner.yyamashita.com>2026-11-01 09:11:31 +0900
commitae0d8e0ea7a35d6df1cada062480d3c43cdb1c78 (patch)
treeaa389169928e3c58d6625a8889525f4cdf5a4e28 /git
parent689b4f4a706746f481555b9a64ff20b33b8e5a75 (diff)
studio-slots を /app/studio-slots にデプロイし管理画面に追加
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'git')
-rwxr-xr-xgit/hooks/studio-slots/post-receive12
-rw-r--r--git/repos.txt2
2 files changed, 9 insertions, 5 deletions
diff --git a/git/hooks/studio-slots/post-receive b/git/hooks/studio-slots/post-receive
index 15bcf9b..4036417 100755
--- a/git/hooks/studio-slots/post-receive
+++ b/git/hooks/studio-slots/post-receive
@@ -1,7 +1,11 @@
#!/bin/bash
set -e
-WORK_TREE=/home/yyamashita/workspaces/repos/studio-slots
-GIT_WORK_TREE=$WORK_TREE git checkout -f
-# フックは root で動くので、作業ディレクトリの所有者を戻す
-chown -R yyamashita:yyamashita "$WORK_TREE"
+APP_DIR=/app/studio-slots
+GIT_WORK_TREE=$APP_DIR git checkout -f
+cd $APP_DIR
+# ファイルが無いままマウントするとディレクトリが作られてしまうので先に作る
+[ -f manual_slots.json ] || echo '{}' > manual_slots.json
+# push でデプロイしたら管理画面の停止状態を解除する
+sed -i '/^studio$/d' /app/infra/status/stopped.txt 2>/dev/null || true
+docker compose up -d --build
echo "Deploy complete: studio-slots"
diff --git a/git/repos.txt b/git/repos.txt
index df165ba..39757fe 100644
--- a/git/repos.txt
+++ b/git/repos.txt
@@ -7,4 +7,4 @@ mosquitone-admin:/home/yyamashita/workspaces/repos/mosquitone-admin
microblog:/app/microblog
todo:/app/todo
license-slot-checker:/home/yyamashita/workspaces/repos/license-slot-checker
-studio-slots:/home/yyamashita/workspaces/repos/studio-slots
+studio-slots:/app/studio-slots