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?
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!
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.
Hi there,
I personally have been mainly using the PHP Buildpack on App Platform as that takes away any complexity:
https://docs.digitalocean.com/products/app-platform/reference/buildpacks/php/
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!
Best,
Bobby