I do not use the qovery CLI, I will install it and let you know!
If I set directly DATABASE_URL from the dashboard it works well, but I want it from my .env.production file. I tried to setup an alias called DATABASE_URL_QOVERY and put in my env file DATABASE_URL="${DATABASE_URL_QOVERY}" but it does not work. I want it from the env file because I need to override some env vars given by qovery, like QOVERY_APPLICATION_XXX_HOST_EXTERNAL: this one returns the domain of the frontend without https, so I put in my env file FRONTEND_URL="https://${QOVERY_APPLICATION_XXX_HOST_EXTERNAL}". But no luck with this one also. Any other suggestion?
Same issue here with CONFIG_ENV=production not passed to the build nextjs process when configured as a projet/environment/application env var. The only solution I have found is to force that env var value in the Dockerfile but that’s not as flexible
Hi Romaric
Well, unless Qovery allowed for --build-arg passing to docker build … would that be feasable, says some list of --build-args in the same way as the env var list perhaps ?
It’s already the case. Qovery passes --env options which leads you to indicate which environment variables you want to use at the build time.
You can take a look at the engine code here:
Indeed, an improvement that we can do is using --build-arg and giving the option to the user to specify which environment variable to use at the build time. Then we do not risk unnecessary invalidation of Docker builds cache layers.