build(docker): keep every .env file out of the image

- .dockerignore excludes .env files at any depth, so a local .env.enterprise with Azure keys is not copied into image layers
- the README says to put Azure keys in .env for Docker
This commit is contained in:
Yijia-Xiao
2026-10-27 08:00:55 +00:00
parent a334a1f878
commit ec4e2c8e5a
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
.git
.venv
.env
**/.env*
.claude
.idea
.vscode
+1 -1
View File
@@ -182,7 +182,7 @@ export ALPHA_VANTAGE_API_KEY=... # Alpha Vantage
export TYPESAFE_API_KEY=... # Jev social-post screening (optional)
```
For Azure OpenAI, copy `.env.enterprise.example` to `.env.enterprise` and fill in your credentials.
For Azure OpenAI, copy `.env.enterprise.example` to `.env.enterprise` and fill in your credentials. With Docker, put these keys in `.env` instead: the image does not include `.env` files.
To run on your ChatGPT Plus or Pro plan instead of an API key, choose "Subscription" in the CLI's provider menu, or set `llm_provider: "chatgpt"`. Sign in once with `tradingagents login chatgpt`: it prints an address to open in your browser, which returns to this machine on `127.0.0.1`. When the browser runs on another machine, or TradingAgents runs in Docker (`docker compose run --rm tradingagents login chatgpt`), paste the address the browser ends up on. The sign-in is kept in `~/.tradingagents/chatgpt-auth.json`, and `tradingagents logout chatgpt` revokes it. Runs count toward your plan's usage limits, and the plan does not accept `temperature` or `max_tokens`.