deploy lnmp(Linux+Nginx+mysql+PHP) using docker
The whole app is divided into three Containers:
- nginx is running in
nginxContainer, which handles requests and makes responses. - PHP or PHP-FPM is put in
PHP-FPMContainer, it retrieves php scripts from host, interprets, executes then responses to Nginx. If necessary, it will connect toMySQLas well. - MySQL lies in
MySQLContainer,
Our app scripts are located on host, you can edit files directly without rebuilding/restarting whole images/containers.
At first, you should have had Docker and Docker Compose installed.
$ docker-compose build
Without building images one by one, you can make use of $(docker-compose) and simply use:
$ docker-compose up --detach
For more operations to containers, please refer to:
$ docker-compose --help
Check out your https://<docker-host> and have fun
i prefer to use : docker-compose up --build --detach
Micooz [email protected]
sndnvaps [email protected]
ymc-github [email protected]
MIT