Deploy lnmp(Linux, Nginx, MySQL, PHP7) using docker.
I want to share my ideas and designs about Web-Deploying using Docker with you.
The whole app is divided into three Containers:
- Nginx is running in
Nginx
Container, which handles requests and makes responses. - PHP or PHP-FPM is put in
PHP
Container, it retrieves php scripts from host, interprets, executes then responses to Nginx. If necessary, it will connect toMySQL
as well. - MariaDB lies in
MariaDB
Container,
Our app scripts are located on host, you can edit files directly without rebuilding/restarting whole images/containers.
- nginx:1.17.0
- php:7.3.6
- mariadb:10.3.15
- Self-signed SSL Certificate
- xdebug:2.7.2 (port 9009)
- GD Lib
- PDO MySQL driver
- MySQL Extension
At first, you should have had Docker and Docker Compose installed.
Without building images one by one, you can make use of docker-compose
and simply issue:
$ sudo docker-compose up
For more operations to containers, please refer to:
$ sudo docker-compose --help
Check out your https://<docker-host> and have fun ๐บ
Pinguinens [email protected]
Micooz [email protected]
sndnvaps [email protected]
MIT