Environment variables not picked up when using docker to build project
Project id: 6b106510-a373-44f1-9ffe-d7b7199cf99a
I'm changing the way my node js to built to use docker, when running the build command in the docker file I'm getting errors around environment variables not being set. They exist however in the railway variables.
My docker file
The error I'm seeing on the failed build.
Solution:Jump to solution
you would need to bring the needed variables into the build with the ARG keyword, like so
and so on for only the variables you need during build...
13 Replies
Project ID:
6b106510-a373-44f1-9ffe-d7b7199cf99a
Solution
you would need to bring the needed variables into the build with the ARG keyword, like so
and so on for only the variables you need during build
Are other variables going to be available during runtime?
yep!
do you have any thoughts/comments about the usage of tailscale to inspect the running deployment?
yes i do: why?
I need to be able to inspect files on the running instance, to run recovery operations as well. I haven't deployed it yet. But hopefully I'll be able to ssh in.
i think need is the wrong word here, im sure you can do what you want to without ssh
We save files locally (temporarily) before processing, if the workflow fails we need to manually recover/inspect the files.
thats definitely a use case for sure, though in an ideal world that manual intervention wouldn’t be needed
Yup, for sure. Working towards that ideal world 🙂
If I'm using a docker image, where does the "custom command run", what directory or which context?
it would be ran in whatever the image sets the workdir to, it is also ran in exec mode and it overwrites the entrypoint and cmd
Ah I see this makes sense.