PHP-FPM + NGINX on App Platform - Separated & Linked, or Single App?

Traditionally I was always running PHP-FPM and NGINX on separated Docker containers on the same network, as running a single service in a container is considered a best practice.

I started to migrate one of my project to App Platform, and I’m not sure whether its possible to run NGINX & PHP-FPM as separated services.

Which one is the preferred solution on App Platform currently?

  1. Keep PHP-FPM and NGINX Separated and link them (is there a variable maybe we can use in App Spec to let them to refer to each other?)
  2. Run PHP-FPM and NGINX in the same container as a single service.

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Bobby Iliev
Site Moderator
Site Moderator badge
March 16, 2023

Hi there,

I personally have been mainly using the PHP Buildpack on App Platform as that takes away any complexity:

This lets you just deploy your PHP application by selecting your GitHub repository and then the Buildpack takes care of building and running your application.

I would probably go for a separate PHP-FPM and a separate Nginx container when deploying to a Kubernetes cluster.

In general, deploying everything in a single container would be simpler, but if you decide to go with separate containers, you would have e better control over the scalability of your app, as you will be able to add extra replicas for the specific container depending on the workloads.

Hope that this helps!



Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

card icon
Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Sign up
card icon
Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We’d like to help.

Learn more
card icon
Become a contributor

You get paid; we donate to tech nonprofits.

Learn more
Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow – whether you’re running one virtual machine or ten thousand.

Learn more ->
DigitalOcean Cloud Control Panel
Get started for free

Enter your email to get $200 in credit for your first 60 days with DigitalOcean.

New accounts only. By submitting your email you agree to our Privacy Policy.

© 2023 DigitalOcean, LLC.