How to deploy a PHP project with docker?

I"ve just read some introductory articles on docker, but I"m still not sure whether it"s appropriate to use docker to deploy a PHP project. For example, it is obviously inappropriate to package a project into a container as a virtual machine, and the separation of nginx and MySQL containers does not seem to solve the problem completely. I summed up the deployment requirements, and asked how to configure docker can have more advantages than the traditional way:
1. Programmers do not have ssh permission and hope to upload program files to the test server through FTP, and manage the database of the test server through Navicat
2. Multiple projects have been deployed in the rehearsal and formal environment. It is hoped that there will be no environmental conflicts in the new projects, such as PHP version issues (this is the advantage of docker)
3. The databases and uploaded folders of the test / rehearsal / formal environment cannot be overwritten during the iteration.
> should be a classic requirement. At present, it is also good to use pagoda panel maintenance. I wonder if docker deployment can meet the needs and have more advantages? How to allocate containers is more reasonable?

Mar.01,2021

uses docker-compose, php mysql nging as a service, and services communicate with each other through Docker Networking.
you can take a look at this book https://codeshelper.com/a/11.


Service choreography docker-compose suits you
, an example

Menu