R
Railwayβ€’3y ago
Yashu

Docker deployments is not processing ENVs correctly

I am using railway postgres & redis database with built-in variables REDIS_URL and DATABASE_URL In the Deploy logs, it throwing an error. REDIS: error: Error: connect ENOENT/$%7B%7B%20REDIS_URL%20%7D%7D I've already added environment variables as ARG in dockerfile.
9 Replies
Faraz
Farazβ€’3y ago
Project ID?
Yashu
YashuOPβ€’3y ago
1c84f53b-ad17-4583-8b37-99f4dd6c7227
Faraz
Farazβ€’3y ago
The part that's throwing, how are you using it in your code? And could you try logging it to see what it logs?
Yashu
YashuOPβ€’3y ago
Just this: ${{ REDIS_URL }} Reading the environment variable, process.env.REDIS_URL (in JS)
Faraz
Farazβ€’3y ago
Could you try removing the REDIS_URL variable from the api service? It should be available already.
Yashu
YashuOPβ€’3y ago
I have added the variable like this?
Yashu
YashuOPβ€’3y ago
Should I remove it?
Faraz
Farazβ€’3y ago
Yep. Plugin variables are already available to services.
Yashu
YashuOPβ€’3y ago
let me try it Oh! now it's logging the correct redis connection URL in logs. πŸ‘Œ Thanks πŸ™‚
Want results from more Discord servers?
Add your server