Clarify env-first install docs
This commit is contained in:
28
README.md
28
README.md
@@ -26,14 +26,32 @@ Repo 內提供:
|
||||
|
||||
`install.env` 不應填入真實 secrets 後再 commit;若要保存本機私密設定,使用 `install.local.env` 並透過 `INSTALL_ENV_FILE=install.local.env` 指定。
|
||||
|
||||
## 全自動 agent 安裝
|
||||
## 安裝流程(先設定 env)
|
||||
|
||||
安裝前請先設定 `install.env`,再檢查 env 是否足夠,最後才正式安裝:
|
||||
|
||||
```bash
|
||||
cp -n install.env.example install.env
|
||||
editor install.env
|
||||
./scripts/install-vault-pass.sh --check-env
|
||||
./scripts/install-vault-pass.sh
|
||||
```
|
||||
|
||||
`install.env` 範例:
|
||||
|
||||
```bash
|
||||
# 例:用一次性 URL 安裝 vault-pass.txt
|
||||
INSTALL_VAULT_PASS_METHOD=url \
|
||||
VAULT_PASS_URL="https://example.com/one-time/vault-pass.txt" \
|
||||
./scripts/install-vault-pass.sh --check-env
|
||||
./scripts/install-vault-pass.sh
|
||||
INSTALL_VAULT_PASS_METHOD="url"
|
||||
VAULT_PASS_URL="https://example.com/one-time/vault-pass.txt"
|
||||
```
|
||||
|
||||
## 全自動 agent 安裝
|
||||
|
||||
Agent / CI 也應優先設定 `install.env` 或 `INSTALL_ENV_FILE`,不要直接進互動選單:
|
||||
|
||||
```bash
|
||||
INSTALL_ENV_FILE=install.local.env ./scripts/install-vault-pass.sh --check-env
|
||||
INSTALL_ENV_FILE=install.local.env ./scripts/install-vault-pass.sh
|
||||
```
|
||||
|
||||
## 常用指令
|
||||
|
||||
Reference in New Issue
Block a user