Should I use forever/pm2 within a (Docker) container?

My take is do not use an in-container process supervisor (forever, pm2) and instead use docker restart policy via the --restart=always (or one of the other flavors of that option). This is more inline with the overall docker philosophy, and should operate very similarly to in-container process supervision since docker containers start running very quickly.

The strongest advocate for running in-container process supervision I’ve seen is in the phusion baseimage-docker README if you want to explore the other position on this topic.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)