The original post: /r/php by /u/nukeaccounteveryweek on 2024-10-10 00:02:43.

Hello!

I recently got a new daily job and my first long-term task is setting up a CI/CD pipeline with Github Actions and Docker. This pipeline will hopefully be used by a bunch of projects (Laravel/Symfony) which are currently hosted at Linode VPS, all of them are deployed manually (yes).

I started looking around for resources on how to build production-ready FPM images, but to be honest most content does not go very in depth. My first thought was using the official FPM image from Docker Hub, but I soon realized that it’s a very barebones image to say the least, for example:

  • A lot of common extensions are not bundled in and must be installed through pecl or docker-php-extension-installer, not a huge problem, but painful still
  • Out of the box the default FPM pool settings are just terrible, not suitable for production environments at all
  • .ini settings are also very poorly setup
  • Opcache must be installed/configured manually
  • I need to override a bunch of stuff in order to get a productive development environment and a ready-to-ship production environment
  • Final image size is seems bigger than necessary
  • Image is run as root by default, which might pose a security risk
  • Etc

So I went looking for other options and found ServerSideUp images.

Anyone using their images in production? Seems to solve every problem I listed above. If anyone has other suggestions I’m very open to hear them.