#Grabbing variable at runtime(passed via docker-compose)

1 messages · Page 1 of 1 (latest)

mossy haven
#

Hey! Does anyone have any good way of getting variable at runtime? I have a docker compose which I pass in environment var but sadly the vite meta data is only for build time and so it’s not getting the environment variable.

My issue is everything is at build time . I used import.meta and process.env which works great if it’s at build time. So passing my environment variable in my docker compose was more at runtime so I could see it at env but after the app built and I couldn’t figure out how to grab the newer env.

harsh kernel
#

i dont think that's possible. what kind of variable exactly do you need to set at runtime?