Docker + Vitejs ENV variables without .env files

Viewed 69

I have an application With vue 3 + ViteJs. I'm trying to configure the env variables in docker compose but in vitejs configuration step the env vars was empty, I deduce that is not in running time and the vite config is in "build time".

Furthermore, I see an option with .env file (or .env.staging, or .env.production, ...) but I'm interested in another option more "dynamic", in docker, dev, stg, pro, ... I want different configurations.

The question is, anyone knows an alternative to .env files ?

0 Answers
Related