chore: 機密の受け渡しを環境変数注入へ移行 (PLAN35) - #3
Merged
Merged
Conversation
devbase 側で環境変数の暗号化 (PLAN35 / devbasex/devbase#90) を導入したのに 合わせ、`devbase env encrypt` が行う compose.yml の書き換えを取り込む。 機密ファイル (`${DEVBASE_ROOT}/.env` と `.env`) の env_file 参照を外し、 devbase が起動時に復号して変数名だけを列挙した構成で注入する形にする。 暗号化していない環境でも秘密ストアが平文へフォールバックして同じ経路で 注入されるため、`devbase up` 経由なら両モードで動作する。 あわせて、up が生成する .docker-compose.scale.yml と、その退避ファイル (.prev) を除外対象に追加する。 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
背景
devbase 本体に環境変数の暗号化が入った (devbasex/devbase#90)。これに伴い、各プロジェクトの
compose.ymlから機密ファイルの直接参照を外す必要がある。暗号化すると
${DEVBASE_ROOT}/.envはsecrets/global.env.ageへ移るため、env_fileがそのパスを参照したままだとファイルが存在せず起動に失敗する。変更
devbase env encryptが行う書き換えをそのまま取り込んだもの。機密は devbase が起動時に復号し、変数名だけを列挙した構成 (
.docker-compose.scale.yml) で渡す。暗号文も平文ファイルも Docker Compose には渡らない。非機密のenvはこれまでどおりenv_fileで読む。対象 6 プロジェクト: adminer / ai-plugins / devbase / github_work_time / md-specgen / tmllib
あわせて
.gitignoreに.docker-compose.scale.yml*を追加した (up が生成する構成と、その退避ファイル.prev)。これまで生成物が未追跡ファイルとして残っていた。暗号化していない環境への影響
なし。 秘密ストアは暗号化ファイルが無ければ平文 (
$DEVBASE_ROOT/.env) へフォールバックし、同じ注入経路を通る。移行済みのcompose.ymlは暗号化・平文の両モードで動作する。ただし
devbase upを介さずdocker compose upを直接実行する場合は、機密が注入されない点に注意 (devbase が復号と注入を担うため)。🤖 Generated with Claude Code