You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed that the configuration of nitro's nitro.config.ts will eventually be serialized and read as JSON.
This creates the following problems:
When using Docker for image packaging, sensitive information must be configured in the code (such as database account passwords and some cloud service keys, etc.)
It is not possible to distinguish the configuration well for dev/test/prod, etc.
Expected goals
For example, when configuring the value of nitro.config.ts, we are allowed to configure environment variables, which will not be serialized and will only be read from the environment variables when the app starts.
Simple example:
exportdefaultdefineNitroConfig({compatibilityDate: "2025-01-11",storage: {cache: {driver: "redis",host: process.env.REDIS_HOST,// or env("REDIS_HOST")port: 6379,},},
Additional information
Would you be willing to help implement this feature?
The text was updated successfully, but these errors were encountered:
Describe the feature
I noticed that the configuration of nitro's nitro.config.ts will eventually be serialized and read as JSON.
This creates the following problems:
When using Docker for image packaging, sensitive information must be configured in the code (such as database account passwords and some cloud service keys, etc.)
It is not possible to distinguish the configuration well for dev/test/prod, etc.
Expected goals
For example, when configuring the value of
nitro.config.ts
, we are allowed to configure environment variables, which will not be serialized and will only be read from the environment variables when the app starts.Simple example:
Additional information
The text was updated successfully, but these errors were encountered: