fix(gateway): load dotenv before federation tier gate (#1138)

This commit is contained in:
shaggy (mosaic-dev box)
2026-08-09 20:50:37 -05:00
parent b4753a75cd
commit b82a51da80
4 changed files with 114 additions and 15 deletions
+3 -1
View File
@@ -31,7 +31,9 @@ import { loadConfig } from '@mosaicstack/config';
// Federation (step-ca client, enrollment, federation verbs) is only wired for
// tier 'federated' — CaService hard-requires STEP_CA_* at construction, which
// must not gate standalone/local boots (docker-compose.federated.yml: the
// federation profile "must not start in non-federated dev").
// federation profile "must not start in non-federated dev"). The gateway
// entrypoint loads env.ts before evaluating this module so dotenv-backed tier
// configuration is visible here.
const federationEnabled = loadConfig().tier === 'federated';
@Module({