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
Enable building 1 docker image to use across multiple environments that will, when revalidated, pull in content from endpoint specified by runtime variable.
Account for changes in production CMS between build time and run time.
Eliminate need to create revalidate-all api endpoint and hit this in the deployment process
Non-Goals
Background
I'm using NextJS in a docker image with Sanity as a headless CMS. I build the image using all production values. Currently I have 2 problems.
When I run the image in a development environment, I need to revalidate everything in order for to see the environment-specific content.
When I run the image on production, even though I've used all production values to build, there most likely have been changes between build time and run time that are not reflected in the content used to generate the pages at build time. Thus when the new image is run, pages are showing content that is days old.
To rectify this, I have created an API endpoint to revalidate all content. I am currently manually hitting that and actively figuring out a solution to automate that in my deployment process.
Proposal
Build in a way to optionally revalidate all content on server start.
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.
-
Goals
Non-Goals
Background
I'm using NextJS in a docker image with Sanity as a headless CMS. I build the image using all production values. Currently I have 2 problems.
To rectify this, I have created an API endpoint to revalidate all content. I am currently manually hitting that and actively figuring out a solution to automate that in my deployment process.
Proposal
Build in a way to optionally revalidate all content on server start.
Beta Was this translation helpful? Give feedback.
All reactions