feat(config): support reading Brave API key from a file (#313)

* feat: support reading Brave API key from a file
* chore: add secret file template and gitignore local keys
* docs: document optional Docker Compose secrets workflow
* fix: trim whitespace API keys and exclude secrets from Docker build
* docs: clarify container paths for BRAVE_API_KEY_FILE
* test: cover API key file config and expand Docker build context ignores
* test: isolate getOptions tests from local env vars
* docs: clarify optional use of BRAVE_API_KEY_FILE
* docs: document BRAVE_API_KEY_FILE in AWS Marketplace catalog template
This commit is contained in:
Sampson authored and GitHub committed 2026-06-24 13:53:51 -05:00
1 parent e3f77ced06
commit fd28e3e7b3
11 files changed
+225 -9

No files matched your search

+19
View File
@@ -0,0 +1,19 @@
# Optional Compose override for Docker secrets.
#
# Usage:
# 1. cp secrets/brave_api_key.txt.example secrets/brave_api_key.txt
# 2. Add your API key to secrets/brave_api_key.txt
# 3. docker compose -f docker-compose.yml -f docker-compose.secrets.example.yml up --build
#
# See https://docs.docker.com/compose/how-tos/use-secrets/
services:
mcp-server:
environment:
BRAVE_API_KEY_FILE: /run/secrets/brave_api_key
secrets:
- brave_api_key
secrets:
brave_api_key:
file: ./secrets/brave_api_key.txt