Skip to content

feat(deploy): support TENANT_ID_FILE and SCHEMA_ID_FILE env vars#74

Merged
zeevdr merged 1 commit into
mainfrom
feat/tenant-id-file
May 31, 2026
Merged

feat(deploy): support TENANT_ID_FILE and SCHEMA_ID_FILE env vars#74
zeevdr merged 1 commit into
mainfrom
feat/tenant-id-file

Conversation

@zeevdr

@zeevdr zeevdr commented May 31, 2026

Copy link
Copy Markdown
Member

Summary

  • Adds file-based fallback for TENANT_ID and SCHEMA_ID so Docker Compose demos can seed these values dynamically from a sibling container without baking them into the Compose file at deploy time.
  • The env var always wins; the file is only read when the env var is empty.

Test plan

  • Set TENANT_ID=abc — verify config.js contains tenantId: "abc" (file ignored)
  • Unset TENANT_ID, set TENANT_ID_FILE pointing to a file containing xyz — verify config.js contains tenantId: "xyz"
  • Unset both — verify config.js contains tenantId: ""
  • Same three cases for SCHEMA_ID / SCHEMA_ID_FILE
  • Set TENANT_ID_FILE to a non-existent path — verify entrypoint does not error and tenantId is empty

Closes #10

The env var (TENANT_ID / SCHEMA_ID) always takes precedence. The file
is only read when the env var is empty, making this a convenience
for Docker Compose demos where IDs are written dynamically by a seed
container at startup.

Closes #10

Co-Authored-By: Claude <noreply@anthropic.com>
@zeevdr zeevdr added this to the Beta Readiness milestone May 31, 2026
@zeevdr zeevdr added size: S Quick win — a few hours or less priority: P2 Nice-to-have labels May 31, 2026
@codecov

codecov Bot commented May 31, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@zeevdr zeevdr merged commit 2f40596 into main May 31, 2026
12 checks passed
@zeevdr zeevdr deleted the feat/tenant-id-file branch May 31, 2026 06:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

priority: P2 Nice-to-have size: S Quick win — a few hours or less

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Single-tenant mode: read TENANT_ID from file

1 participant