S
SolidJS16mo ago
oneiro

What is the proper way to start solid-start in production (especially with something like pm2)?

Hey folks, I am currently running solid-start in production with a docker compose setup. Solid start is being run by first producing a build with running solid-start build and then invoking solid-start start. Is this the proper way to run solid-start in production? Is there a way to just run the output from solid-start build? When running something with pm2 for example you typically provide a single javascript file as scriptentrypoint. How would I do that with solid-start? I want to start clustering my application. But before I use something large like kubernetes for scaling, I want to use pm2 inside my docker-container. Thanks in advance 🙂
2 Replies
Some Call Me Tim
Some Call Me Tim16mo ago
Just run /dist/server.js with PM2 in your container. works great here
oneiro
oneiroOP16mo ago
Awesome, thanks for chiming in! ❤️ @iron.maiden that's right in general, however that would involve more setup to properly load balance if I am not mistaken. Having pm2 in a container at least makes your app scale somewhat and make better usage of available cpus. So both things can improve performance to some degree @timothyallan thanks again, works like a charm yeah, that makes sense 🙂 For my case running pm2 in a single container is easy enough and good enough for now 👍
Want results from more Discord servers?
Add your server