I've managed to deploy my Payload app to AWS EBS using docker. I'm using the example
Dockerfile
with the exception of the run command; instead of using node, I'm using pm2 (
CMD ["pm2-runtime","dist/server.js"]
)
Once it's deployed, the first load of the admin is SO SO Slow! API responses are ok, I imagine is something to do with webpack? But I'm not sure how to debug this. Any idea?
How slow are we talking? 3 seconds? 10 seconds? More?
Do you see the same slowness when building the dockerfile then running it locally?
About a minute to first load
whaaaaat
do you have
NODE_ENV=production
?
you should be running in production mode, which should completely bypass Webpack and serve static, prebuilt admin files
make sure you have that set and then you should be golden
Star
Discord
online
Get help straight from the Payload team with an Enterprise License.