Replies: 1 comment
-
I found in my I think I ran into an error building at one point, which is why I defined it there. But it seems to build fine now. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm trying to access environment variables through
process.env
, but they are not available at runtime, unless they are there when building.I first ran into this on
fly.io
. My secrets are not available when my app starts up.I also discovered this is happening when I build the docker image locally and try to run with
docker run --env-file .env
.From the shell, I can run
env
and see my environment variables. I can also runnode
andconsole.log(process.env)
from the repl to see them. But if I doconsole.log(process.env);
inside a server file, only the npm and node default environment variables are present.How am I supposed to access secret environment variables at runtime?
Beta Was this translation helpful? Give feedback.
All reactions