2 Star 8 Fork 5

Wildlife / docker-lnmp

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

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

# register account
acme.sh --register-account -m your@example.com

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

# issue a certificate by validating DNS TXT records
# see https://github.com/Neilpang/acme.sh/wiki/%E8%AF%B4%E6%98%8E
export TLD=example.com
acme.sh --issue --dns dns_ali -d "$TLD" -d "*.$TLD"

# install the certificate and update it automatically
acme.sh --install-cert \
    -d "$TLD" \
    -d "*.$TLD" \
    --key-file "$(pwd)/nginx/ssl/$TLD.key" \
    --fullchain-file "$(pwd)/nginx/ssl/$TLD.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 -
MIT License Copyright (c) 2019 Wildlife Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

一键 Docker LNMP 环境 展开 收起
Docker 等 2 种语言
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
Docker
1
https://gitee.com/lanseyujie/docker-lnmp.git
git@gitee.com:lanseyujie/docker-lnmp.git
lanseyujie
docker-lnmp
docker-lnmp
master

搜索帮助