You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We’re currently using Imgix as our image provider. Our website is built with Nuxt, but at the moment we’re not using the @nuxt/image module.
As part of our ongoing development, I’m working on a new backend and plan to integrate @nuxt/image moving forward. Our CI/CD pipeline builds Docker images for the application, which are then deployed to our Kubernetes infrastructure.
The issue we’re facing is that we use the same Docker image for both staging and production environments. Since the configuration for @nuxt/image—specifically the baseURL for Imgix—is determined at build time, this becomes problematic. Our staging and production environments each have different Imgix base URLs, so hardcoding one at build time isn’t a viable solution.
My question is:
Is there a way to dynamically set the baseURL (or other @nuxt/image config options) at runtime using environment variables? Wouldn’t it be more flexible if these configurations could be modified globally at runtime instead of being locked at build time?
Appreciate any insights or recommendations on best practices here...
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hi everyone,
We’re currently using Imgix as our image provider. Our website is built with Nuxt, but at the moment we’re not using the @nuxt/image module.
As part of our ongoing development, I’m working on a new backend and plan to integrate @nuxt/image moving forward. Our CI/CD pipeline builds Docker images for the application, which are then deployed to our Kubernetes infrastructure.
The issue we’re facing is that we use the same Docker image for both staging and production environments. Since the configuration for @nuxt/image—specifically the baseURL for Imgix—is determined at build time, this becomes problematic. Our staging and production environments each have different Imgix base URLs, so hardcoding one at build time isn’t a viable solution.
My question is:
Is there a way to dynamically set the baseURL (or other @nuxt/image config options) at runtime using environment variables? Wouldn’t it be more flexible if these configurations could be modified globally at runtime instead of being locked at build time?
Appreciate any insights or recommendations on best practices here...
Thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions