Question about environment variables
I have a question about Railway environment variables. I am deploying a flask app with postgresql to Railway App, and setting up env variables. Does these variables depends on the variables that are used while developing the app? Or vice versa?
7 Replies
Project ID:
N/A
Does these variables depends on the variables that are used while developing the app? Or vice versa?mind explaining what you mean by that?
I have some configuration file and .env file in flask that contains some SECRET_KEY and database url.
Does these depends on railway env variables?
I'm still not sure what you mean by "depends on railway env variables"
when deploying your app on railway, everything that would normally go in your
.env
file would go in your Service Variables
, that way Railway can add these environment variables into your app
( Keep in mind though, Railway doesn't create a .env
file for you, neither should you have a .env
file in your production app )so I should not use the environment variables from Railway in my code?
?
what environment variables from Railway?
You’re going to have to be more clear, I don’t know what you mean by “do these variables depend on the variables that are used while developing the app”
if you mean “will the environment variables be the same as what they are locally”, then no. Not unless you set them yourself
If you are referring to the postgres db credentials, your railway postgres db should be different than your local development db