summaryrefslogtreecommitdiff
path: root/CLAUDE.md
diff options
context:
space:
mode:
Diffstat (limited to 'CLAUDE.md')
-rw-r--r--CLAUDE.md26
1 files changed, 19 insertions, 7 deletions
diff --git a/CLAUDE.md b/CLAUDE.md
index 28124bf..8e43573 100644
--- a/CLAUDE.md
+++ b/CLAUDE.md
@@ -5,17 +5,18 @@ Hetzner VPS 上で動くサービス群のインフラ管理リポジトリ。
## ディレクトリ構成
```
-caddy/ リバースプロキシ(Caddyfile, docker-compose.yml, deploy.sh)
-cgit/ cgit Web UI(Dockerfile, lighttpd.conf, cgitrc, deploy.sh)
-git/ ベアリポジトリ・フック管理(repos.txt, hooks/, install.sh)
-claude/ Claude Code セッション管理(sessions.txt, systemd unit, sync.sh)
-mail/ MTA(Postfix + OpenDKIM, docker-compose.yml, install.sh, dns/setup-route53.py)
-server/ サーバー共通設定(authorized_keys, requirements.md)
+caddy/ リバースプロキシ(Caddyfile, docker-compose.yml, deploy.sh)
+cgit/ cgit Web UI(Dockerfile, lighttpd.conf, cgitrc, deploy.sh)
+git/ ベアリポジトリ・フック管理(repos.txt, hooks/, install.sh)
+claude/ Claude Code セッション管理(sessions.txt, systemd unit, sync.sh)
+hetzner-admin/ サーバー管理 Web UI(app.py, Dockerfile, docker-compose.yml, deploy.sh)
+mail/ MTA(Postfix + OpenDKIM, docker-compose.yml, install.sh, dns/setup-route53.py)
+server/ サーバー共通設定(authorized_keys, requirements.md)
```
## デプロイの仕組み
-- `git push origin master` → post-receive フック → `caddy/deploy.sh` / `cgit/deploy.sh` / `mail/deploy.sh` を実行
+- `git push origin master` → post-receive フック → `caddy/deploy.sh` / `cgit/deploy.sh` / `mail/deploy.sh` / `hetzner-admin/deploy.sh` を実行
- cgit の `lighttpd.conf` / `Dockerfile` 変更はイメージ再ビルドが必要(`deploy.sh` で `--build` するため push だけで反映される)
- cgit の `cgitrc` はボリュームマウントのため push だけで反映される
- フック・リポジトリの変更は push 後に `bash /app/infra/git/install.sh` を手動実行
@@ -73,4 +74,15 @@ python3 /app/infra/mail/dns/setup-route53.py
vi mail/domains.txt
git push origin master
ssh root@localhost 'bash /app/infra/mail/install.sh' # テーブル再生成 + 再起動
+
+# hetzner-admin 初回セットアップ(サーバー上で実行)
+ssh root@<server>
+cat > /app/infra/hetzner-admin/.env <<EOF
+ADMIN_USER=admin
+ADMIN_PASS=<strong-password>
+SSH_USER=root
+EOF
+bash /app/infra/hetzner-admin/install.sh
+# → SSH鍵生成 + authorized_keys登録(command= 制限付き)+ コンテナ起動
+# → admin.yyamashita.com でアクセス可能
```