What's the best way to handle prod builds?
Unanswered
Mini Rex posted this in #help-forum
Mini RexOP
Hey guys so in my current setup I do the following:
build the docker image locally (using --experimental-build-mode compile while building the app since I don't have access to my prods db locally)
upload the image to my registry and then pull it automatically from the server
automatically start the container on the server
outcome:
everything works, but I'm not seeing the x-nextjs-cache header.
so I guess that complementing --experimental-build-mode compile with --experimental-build-mode generate is required, but wouldn't that require to have node modules in the image 😭
Would spinning up a dummy DB locally and then using the regular build with no experimental flag be sufficient? I guess I would need to revalidate everything on payload init otherwise there would be blank pages?
build the docker image locally (using --experimental-build-mode compile while building the app since I don't have access to my prods db locally)
upload the image to my registry and then pull it automatically from the server
automatically start the container on the server
outcome:
everything works, but I'm not seeing the x-nextjs-cache header.
so I guess that complementing --experimental-build-mode compile with --experimental-build-mode generate is required, but wouldn't that require to have node modules in the image 😭
Would spinning up a dummy DB locally and then using the regular build with no experimental flag be sufficient? I guess I would need to revalidate everything on payload init otherwise there would be blank pages?