This is a PHP runtime environment which base on docker.
The services provided include but not limited to nginx php and mysql.
In future functions, plan to join mongdb redis and ELK equal services.
You can run this software on linux or windows or mac, recommending use of x86_64 linux platforms.
If you run on a mac, please reference https://docs.docker.com/docker-for-mac/osxfs/#namespaces share you mount directory.
I really want your feedback when you have problems encountered during use.
git version 1.8.3.1 or higher
docker version 17.09.0-ce or higher
docker-compose version 1.16.1 or higher
$ git clone https://github.com/yinfuyuan/docker-lnmp.git
$ docker-compose up -d
# echo '127.0.0.1 www.example.com' >> /etc/hosts
$ curl -i -X HEAD www.example.com
The nginx config file at the directory /services/nginx/config/ You don't have to modify nginx.con, if you want to add some domains. You can copy /services/nginx/config/conf.d/example.conf to a new file. Change this file and exec the following commands to make it effective.
# docker-compose restart nginx
By default, the services config file are both at /services/[service]/config/ directory. You can modify the config files accordingly to your needs.
- All configuration files are mounted outside the container.
- All the /volumes/ files both should be soft links to external files.
- /volumes/application/http use domain name upside down tree.