You can use this repo to build your LNMP quickly by using docker.
For now many softwares have been uesd in docker container.
If you want to add new container, feel free to make PR .
Support:
- Nginx ✅
- Mysql ✅
- Mariadb ✅
- PHP-FPM ✅
- Gitea ✅
- Jenkins ✅
- Redis ✅
git clone https://github.com/noxxxxxxxx/docker.git
git clone https://github.com/noxxxxxxxx/docker.git
# use macos branch, because normally the system not recommend to modify home directory, so we choose document directory
git checkout macos
You need install these tools before you start to create Docker container.
- Docker
- Docker Compose
Use bridge network to connect each container
docker network create -d bridge nginx_proxy
If no need to use https, ignore this part.
Install acme.sh
You can connect mysql container through Nginx.
- unzip your phpmyadmin file in
nginx/html/default/phpmyadmin
- setting config file
mv config.inc.sample.php config.inc.php
vim config.inc.php
# add $cfg['AllowArbitraryServer']=true;
- if nginx container is running, visit
http://ip/phpmyadmin
- server address is mysql container name
mysql
,which you can modify inmysql/docker-compose.yml
DB_HOST
inwp-config.php
is mysql container namemysql
server {
set $custom_path "/var/www/html/${folder name in nginx/html}";
listen 80;
}
Composer install
docker exec -it docker-php /bin/bash
cd target/directory
composer install
Before you start mysql container, you need modify mysql root password
- Support remote connect
- If you want to connect MySql container from remote, you can uncomment the code from
nginx.conf
- If you want to connect MySql container from remote, you can uncomment the code from
Like GitLab but less memory useage. If you want to use the seperate database container, you can use the official docker-compose.yml file.
# run this command before you start jenkins container
chown -R 1000:1000 /home/docker/jenkins/jenkins-data
docker compose up -d
./data
redis dataredis.conf
redis config
docker compose up -d