summaryrefslogtreecommitdiff
path: root/CLAUDE.md
diff options
context:
space:
mode:
authoryyamashita <yyamashita@hetzner.yyamashita.com>2026-10-31 19:28:45 +0900
committeryyamashita <yyamashita@hetzner.yyamashita.com>2026-10-31 19:28:45 +0900
commitff39e864a0b7e9a98340bf564a7a4bf566958a77 (patch)
tree1f3f6db573956f4debb43bbbf605b6fde8bc8cf3 /CLAUDE.md
parent01e7d14bf9f1cf3b9a5879ffbe4a8f0b5f553323 (diff)
Consolidate status pages into status.yyamashita.com
Drop Uptime Kuma (uptime.yyamashita.com) and the hetzner-admin /status page; status-app + ntfy alerts is the single status site. hetzner-admin now just links to it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'CLAUDE.md')
-rw-r--r--CLAUDE.md30
1 files changed, 9 insertions, 21 deletions
diff --git a/CLAUDE.md b/CLAUDE.md
index 557fcfb..6861c6a 100644
--- a/CLAUDE.md
+++ b/CLAUDE.md
@@ -14,13 +14,12 @@ mail/ MTA(Postfix + OpenDKIM, docker-compose.yml, install.sh, dns/se
vpn/ strongSwan IKEv2 VPN(Dockerfile, docker-compose.yml, install.sh, renew-cert.sh)
status/ 軽量ステータスページ(app.py, targets.txt, Dockerfile, docker-compose.yml, deploy.sh)
ntfy/ ntfy 通知サーバー(server.yml, docker-compose.yml, deploy.sh, install.sh)
-uptime-kuma/ Uptime Kuma 監視(docker-compose.yml, deploy.sh)
server/ サーバー共通設定(authorized_keys, requirements.md)
```
## デプロイの仕組み
-- `git push origin master` → post-receive フック → `caddy/deploy.sh` / `cgit/deploy.sh` / `mail/deploy.sh` / `hetzner-admin/deploy.sh` / `vpn/deploy.sh` / `ntfy/deploy.sh` / `status/deploy.sh` / `uptime-kuma/deploy.sh` を実行
+- `git push origin master` → post-receive フック → `caddy/deploy.sh` / `cgit/deploy.sh` / `mail/deploy.sh` / `hetzner-admin/deploy.sh` / `vpn/deploy.sh` / `ntfy/deploy.sh` / `status/deploy.sh` を実行
- cgit の `lighttpd.conf` / `Dockerfile` 変更はイメージ再ビルドが必要(`deploy.sh` で `--build` するため push だけで反映される)
- cgit の `cgitrc` はボリュームマウントのため push だけで反映される
- フック・リポジトリの変更は push 後に `bash /app/infra/git/install.sh` を手動実行
@@ -128,32 +127,21 @@ docker compose -f /app/infra/vpn/docker-compose.yml restart
vi caddy/docker-compose.yml # PROXY_NO_AUTH=1 を削除(VPN と同じ users.conf の Basic 認証に戻る)
git push origin master
-# ステータスページ(3 種類)
-# - status.yyamashita.com : 公開ステータスページ(status/)。監視対象は status/targets.txt
-# JSON は /api/status。targets.txt は push だけで反映(次回チェック時に再読込)
-# - uptime.yyamashita.com : Uptime Kuma(uptime-kuma/)。監視設定・通知は Web UI で行う(データは volume に永続化)
-# - hetzner-admin /status : 認証付き。status-app の結果 + docker ps -a のコンテナ状態
+# ステータスページ(status.yyamashita.com, status/)
+# 監視対象は status/targets.txt(push だけで反映、次回チェック時に再読込)。JSON は /api/status
+# ntfy(ntfy.yyamashita.com, 認証必須)のトピック "status" に通知する:
+# - 連続 2 回失敗で DOWN、復旧で recovered
+# - 毎朝 8:00 JST に稼働率サマリー(status/.env に SUMMARY_HOUR=-1 で無効)
vi status/targets.txt && git push origin master
-# ステータスページ初回セットアップ
+# 初回セットアップ(済み。再構築時の手順)
git push origin master
ssh root@localhost 'bash /app/infra/git/install.sh' # post-receive フック更新
-ssh root@localhost 'bash /app/infra/status/deploy.sh && bash /app/infra/uptime-kuma/deploy.sh'
-python3 /app/infra/mail/dns/setup-route53.py # status / uptime の CNAME 追加
-# → 直後に https://uptime.yyamashita.com を開いて管理者アカウントを作成する
-# (初回アクセスした人が管理者になるため、放置しないこと)
-
-# ntfy 通知(ntfy.yyamashita.com)初回セットアップ
-# 認証必須(deny-all)。status-app が連続 2 回失敗で DOWN、復旧で recovered をトピック "status" に通知
-# 毎朝 8:00 JST に前日分の稼働率サマリーも送る(status/docker-compose.yml で SUMMARY_HOUR=-1 にすると無効)
-git push origin master
-ssh root@localhost 'bash /app/infra/git/install.sh' # post-receive フック更新
-python3 /app/infra/mail/dns/setup-route53.py # ntfy の CNAME 追加
+ssh root@localhost 'bash /app/infra/ntfy/deploy.sh && bash /app/infra/status/deploy.sh'
+# DNS(status / ntfy の CNAME): 下の「DNS 登録」参照
ssh -t root@localhost 'bash /app/infra/ntfy/install.sh' # 管理ユーザー作成(パスワード入力)
# → トークンを発行して status/.env に NTFY_URL / NTFY_TOKEN を書き込み、status-app を再起動
# スマホ: ntfy アプリでサーバー https://ntfy.yyamashita.com を追加し、トピック status を購読(admin でログイン)
-# Uptime Kuma: Settings → Notifications → ntfy
-# Server URL: http://ntfy / Topic: status / Access Token: ntfy token add admin で発行したもの
# ntfy テスト送信
ssh root@localhost 'docker exec ntfy ntfy publish --token "$(grep NTFY_TOKEN /app/infra/status/.env | cut -d= -f2)" http://localhost/status "test"'