refactor(env): unify required-env validation through useRuntimeConfig
validate-env.js now reads all four required vars (MONGODB_URI, JWT_SECRET, RESEND_API_KEY, HELCIM_API_TOKEN) from useRuntimeConfig() instead of mixing direct process.env reads with a JWT-only special case. Mongoose and the six Resend instantiations follow suit. Either bare or NUXT_-prefixed env names are accepted, so Dokploy no longer needs duplicate entries.
This commit is contained in:
parent
1083a1d260
commit
04eb33df6e
9 changed files with 17 additions and 24 deletions
|
|
@ -91,8 +91,7 @@ export default defineNuxtConfig({
|
|||
},
|
||||
runtimeConfig: {
|
||||
// Private keys (server-side only)
|
||||
mongodbUri:
|
||||
process.env.MONGODB_URI || "mongodb://localhost:27017/ghostguild",
|
||||
mongodbUri: process.env.MONGODB_URI || "",
|
||||
jwtSecret: process.env.JWT_SECRET || "",
|
||||
resendApiKey: process.env.RESEND_API_KEY || "",
|
||||
helcimApiToken: process.env.HELCIM_API_TOKEN || "",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue