2 Star 5 Fork 3

Wildlife / docker-lnmp

Create your Gitee Account
Explore and code with more than 6 million developers,Free private repositories !:)
Sign up
Clone or download
Cancel
Notice: Creating folder will generate an empty file .keep, because not support in Git
Loading...
README.md

docker-lnmp

Publish Docker LNMP Image

Usage

# Clone
git clone https://github.com/lanseyujie/docker-lnmp.git && cd docker-lnmp

# Build & Start
docker-compose up -d

# Stop & Remove
docker-compose down

# Start
docker-compose start

# Restart
docker-compose restart

# Stop
docker-compose stop

# Logs
docker-compose logs

SSL Deploy

# install acme.sh
curl https://get.acme.sh | sh

# set api key
# see https://github.com/Neilpang/acme.sh/wiki/dnsapi
export Ali_Key="12345678"
export Ali_Secret="abcdefg"

# issue a cert
# see https://github.com/Neilpang/acme.sh/wiki/%E8%AF%B4%E6%98%8E
acme.sh --issue --dns dns_ali -d example.com -d *.example.com

# auto update
acme.sh --install-cert \
    -d example.com \
    -d *.example.com \
    --key-file $(pwd)/nginx/ssl/example.com.key \
    --fullchain-file $(pwd)/nginx/ssl/example.com.cer \
    --reloadcmd "docker restart nginx"

Other

# PHP Built-in HTTP Server
docker run -it --rm -p 8080:8080 -v $(pwd):/data/ docker-lnmp-php:latest sh -c "php -S 0.0.0.0:8080 -t /data"

# Auto Backup Database
cd docker-lnmp && crontab -l | {
    cat
    echo "0 3 * * * $(pwd)/script/autobak.sh -uroot -p123456 -dwww > /dev/null"
} | crontab -

Comments ( 0 )

Sign in for post a comment

About

Cancel

Releases

No release

Contributors

All

Activities

load more
can not load any more
Docker
1
https://gitee.com/lanseyujie/docker-lnmp.git
git@gitee.com:lanseyujie/docker-lnmp.git
lanseyujie
docker-lnmp
docker-lnmp
master

Search