
I ran into the issue of how to manage environment variables with a NextJS app a while ago and made some notes
After living with this for a while and settling on using sops for secrets encryption what I have found works best for me is
Read more ...I am working on a Next.js project that has 9 websites with different content and themes but the exact same structure.
We want one codebase and one server to reduce costs (and the carbon footprint of our cloud) and also to streamline the process of releasing new features.
So we’re using middleware to detect which host the incoming request is for and add that as a parameter - which worked fine in development but I had some problems moving to our production system which is in Kubernetes.
Read more ...
See Nextjs Env Vars Mk2
I’m running Next.js apps in production using Kubernetes - and I’ve inherited some setup that I didn’t fully understand so I’ve been investigating what is going on with environment variables.
My inherited system used a build per environment and bakes in configuration at that point.
I dislike this because …
Read more ...