the container does not take an environment variable
fabiobustostech
HOBBYOP

a year ago

There is an environment variable that the container does not take, strangely the variable is configured in the variables section but the container does not get it, I tried the same on my premises when building the docker image and it does not generate problems, the server tells me:
Environment variables before creating the application: { JWT_SECRET: undefined }

[Nest] 1 - 01/20/2025, 10:04:58 PM LOG [NestFactory] Starting Nest application…

[Nido] 1 - 01/20/2025, 10:04:58 PM ERROR [ExceptionHandler] An instance of EnvironmentVariables has failed validation:

  • The JWT_SECRET property has not met the following restrictions: isString

Error: An instance of EnvironmentVariables has not passed validation:

  • The JWT_SECRET property has not met the following restrictions: isString

in Object.validate (/app/dist/auth/auth.module.js:42:31)

in ConfigModule.forRoot (/app/node_modules/@nestjs/config/dist/config.module.js:78:45)

in Object. (/app/dist/auth/auth.module.js:36:35)

in Module._compile (node:internal/modules/cjs/loader:1469:14)

in Module._extensions..js (node:internal/modules/cjs/loader:1548:10)

in Module.load (node:internal/modules/cjs/loader:1288:32)

in Module._load (node:internal/modules/cjs/loader:1104:12)

at Module.require (node:internal/modules/cjs/loader:1311:19)

at require (node:internal/modules/helpers:179:18)

at Object. (/app/dist/qr/qr.module.js:15:23)

View Deploy details

> ⓘ Deployment information is only viewable by project members and Railway employees.

Solved

2 Replies

fabiobustostech
HOBBYOP

a year ago

In the image you can see that the variable is configured

Attachments


a year ago

Hello,

Looks like you found the Deploy button, going to mark this as solved.


Status changed to Solved brody about 1 year ago


Loading...