Files
lunarfront-manager/src/lib/config.ts
Ryan Moon fe62514515
Some checks failed
Build & Release / build (push) Has been cancelled
feat: single shared Spaces key, deactivate/reactivate customer, status badge for inactive
2026-04-03 20:21:52 -05:00

22 lines
848 B
TypeScript

export const config = {
port: Number(process.env.PORT ?? 3000),
doToken: process.env.DO_API_TOKEN!,
doDbClusterId: process.env.DO_DB_CLUSTER_ID!,
gitSshKey: process.env.GIT_SSH_KEY!,
gitRepoUrl: process.env.GIT_REPO_URL ?? "ssh://git@git-ssh.lunarfront.tech/ryan/lunarfront-charts.git",
dbUrl: process.env.DATABASE_URL!,
doadminDbUrl: process.env.DOADMIN_DATABASE_URL!,
jwtSecret: process.env.JWT_SECRET!,
managedValkeyUrl: process.env.MANAGED_VALKEY_URL!,
spacesBucket: process.env.SPACES_BUCKET ?? "lunarfront-data",
spacesRegion: process.env.SPACES_REGION ?? "nyc3",
spacesKey: process.env.SPACES_KEY!,
spacesSecret: process.env.SPACES_SECRET!,
};
for (const [key, val] of Object.entries(config)) {
if (val === undefined || val === "") {
throw new Error(`Missing required env var for config key: ${key}`);
}
}