Repository navigation
compose 的 env_file 指向 isec 渲染文件,不再挂仓内明文 - #31
Merged
Merged
Conversation
本仓的密钥已经迁进自建 Infisical,仓里的 .env 会被移走。compose 的 env_file:
只认路径、认不了环境变量,所以改成让它读 isec 提供的渲染文件。
compose 会对整份 YAML 做变量插值,env_file 的路径也在内:
- 在 isec 之下:${ISEC_ENV_FILE} 解析成该仓的渲染文件路径
- 不在 isec 之下:compose 报 'required variable ISEC_ENV_FILE is missing'
直接退出,不会带着一份空配置把服务拉起来
两个方向都实测过:isec docker compose config 退出码 0;
去掉 ISEC_ENV_FILE 退出码非 0。
日常启动方式从 docker compose up 改成 isec docker compose up。
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Agent-Executor: cc
Agent-Session: 5f6b196e-3278-4b31-8708-72459c886f39
Agent-Effort: high
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.
为什么
本仓的密钥已迁进自建 Infisical,仓里的
.env会被移走。docker compose 的env_file:只认路径、认不了环境变量,文件一没就起不来。改法
compose 会对整份 YAML 做变量插值,
env_file的路径也在内:isec会导出ISEC_ENV_FILE,指向本机 infisical-agent 为该仓渲染出来的密钥文件(tmpfs,600)。
isec之下 → 解析成该仓的渲染文件路径isec之下 → compose 报required variable ISEC_ENV_FILE is missing直接退出,不会带着一份空配置把服务拉起来
实测
isec docker compose config --quietISEC_ENV_FILE后docker compose config --quiet密钥侧已单独核过:渲染文件与原
.env逐键比对全部一致,键数相等。对使用者的影响
日常启动从
docker compose up改成isec docker compose up。🤖 Generated with Claude Code