From ae0d8e0ea7a35d6df1cada062480d3c43cdb1c78 Mon Sep 17 00:00:00 2001 From: yyamashita Date: Sun, 1 Nov 2026 09:11:31 +0900 Subject: studio-slots を /app/studio-slots にデプロイし管理画面に追加 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 5.5 --- git/hooks/studio-slots/post-receive | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'git/hooks/studio-slots') 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" -- cgit v1.3