Railway not using dotenv properly
I have a Kotlin/java bot. It uses a library called dotenv to get environment variables from a file. However, when deploying to railway with the environment variables set in settings, I get errors saying "/.env does not exist." Any ideas?
8 Replies
Project ID:
ca9e8dc4-0fc3-403c-b07e-41cc02c47916
ca9e8dc4-0fc3-403c-b07e-41cc02c47916
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
Yes
I am deploying from github, yes.
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
Is there a way to make railway build a
.env
from my .env.example
I was using those, but dotenv
needs a .env
file.Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
i found a solution,
dotenv
allows you to fallback to System.getEnv()
if there is no .env