docs: CLAUDE.md を階層化した共通ルールに合わせて整理し、GEMINI.md と .agents/rules(Antigravity 用参照)を追加
Helm Chart Release / release-chart (push) Successful in 5s

This commit is contained in:
2026-09-04 13:24:02 +09:00
parent eb3eef601a
commit 6de85b9ad4
3 changed files with 42 additions and 7 deletions
+11 -7
View File
@@ -1,24 +1,28 @@
# CLAUDE.md — phpfpm Helm Chart
> **共通ルール(要約)** — 詳細は `P:\Claude\CLAUDE.md`(全体共通)と `P:\Claude\HelmChart\CLAUDE.md`(Helm チャート共通: リリースフロー・ワークフロー・Gitea Secrets・クラスタ構成)を参照。
> 作業前に pull / 機能変更時は README 更新 / 作業単位ごとに commit → push まで / コミットに AI クレジットを付けない / pull で入った変更を revert しない / Helm・PHP はローカル実行不可(Python のみ可)。
## リポジトリ概要
Raspberry Pi などのベアメタルで稼働することを想定した、Kubernetes 上で動作する Nginx + PHP-FPM の Helm チャート。
Websites 組織の各サイト(e-learn.jp / fcdomain.com / hotels / tskholding.com など)はこのチャートでデプロイされる。
- **Gitea リポジトリ**: `ssh://git@192.168.9.65/helmchart/phpfpm`
- **Helm リポジトリ**: `https://git.cafepieters.com/api/packages/helmchart/helm`
- **主アプリ**: PHP(`docker.io/php:<tag>-fpm-alpine`)。サブアプリ: nginx
## 実行環境について
**PHP の実行環境(インタープリタ)はこのリポジトリには含まれていない。**
チャートは `docker.io/php:<tag>-fpm-alpine` の公式イメージを Kubernetes 上で起動するものであり、PHP コードそのものは PVC(`/var/www/html`)に別途配置する必要がある。
## Git コミット情報
## 設計上の注意(既知の落とし穴)
| 項目 | 値 |
|------|-----|
| 名前 | Claude |
| メール | claude@cafepieters.com |
| SSH キー | `P:\Claude\.ssh\id_claude` |
- `templates/configmap.yaml` が実際に使われている nginx 設定。`templates/configmap-nginx.yaml` は `.Values.nginx.enabled` が values.yaml に存在せず常に未出力の**死んだファイル**なので注意。
- PVC はルートを `/var/www` にマウントする(`html/` が公開フォルダ、それ以外は非公開)。`/composer` は Pod 再起動ごとにクリーン再構築される使い捨て領域。
- `uploadMaxSize` 1箇所で nginx `client_max_body_size`・PHP `upload_max_filesize`/`post_max_size`・Ingress `proxy-body-size` の3箇所が連動する。
- Secret / ConfigMap をファイルとして PHP-FPM ワーカー(`www-data`)から読ませる場合、権限は `0644` にする(`0600` だと読めない)。
## チャート改修履歴
@@ -36,7 +40,7 @@ nginxの `client_max_body_size` とPHPの `upload_max_filesize`/`post_max_size`
### sitemap.xml のContent-Type明示(2026-08-06, v8.5.9-a)
`templates/configmap.yaml`(実際に使われているnginx設定。`templates/configmap-nginx.yaml` は `.Values.nginx.enabled` が values.yaml に存在せず常に未出力の死んだファイルなので注意)に `location = /sitemap.xml { types { } default_type "application/xml; charset=utf-8"; ... }` を追加。標準mime.typesでは `.xml` が `text/xml` 扱いでcharset無しになる問題への対応。静的ファイルの場合のみ有効、PHP動的生成には効かない(PHP側でheader()指定が必要)。設定不要・常時有効。
`templates/configmap.yaml` に `location = /sitemap.xml { types { } default_type "application/xml; charset=utf-8"; ... }` を追加。標準mime.typesでは `.xml` が `text/xml` 扱いでcharset無しになる問題への対応。静的ファイルの場合のみ有効、PHP動的生成には効かない(PHP側でheader()指定が必要)。設定不要・常時有効。
**対象ファイル**: `templates/configmap.yaml`, `README.md`, `Chart.yaml`, `CHANGELOG-8.5.9-a.md`