You can use this repository to quickly build your LNMP
stack using Docker.
Currently, many software applications are being utilized within Docker containers.
All container configurations in this repository are written in accordance with the official documentation. Users can modify the configurations according to their actual needs. There are no customized scripts, so they can also be used as demos for reference and learning.
If you want to add new container, feel free to make PR.
Support:
- Nginx ✅
- Mysql ✅
- Mariadb ✅
- PHP-FPM ✅
- Gitea ✅
- Jenkins ✅
- Redis ✅
- Glances ✅
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
- Config your site.conf
server {
set $custom_path "/var/www/html/${folder_name in nginx/html}";
listen 80;
}
chown -R www-data:www-data /home/docker/nginx/html/your_wordpress_site_file
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
- Update
glances.conf
file before you get ready to use the latest version of Glances - Use
docker compose build
,so you can customize the configuration docker compose up -d
- Open your browser and visit ip::61208