Skip to content
letwang edited this page Jun 7, 2022 · 30 revisions

Install

1.添加Hosts

sudo tee -a /etc/hosts <<EOF
127.0.0.1 www.admin.com
127.0.0.1 www.iot.com
127.0.0.1 www.paas.com
127.0.0.1 www.payment.com
127.0.0.1 www.store.com
EOF

2.环境

git clone [email protected]:letwang/HookPHP.git && cd HookPHP && git pull

选择

开箱即用 🚀

sudo docker run -itd -p 81:80 -p 3307:3306 -p 6380:6379 -p 27018:27017 -p 15673:15672 -p 9002:9001 --name hookphp \
-v `pwd`/../:/usr/local/openresty/nginx/html/wwwroot \
-v `pwd`/:/usr/local/openresty/nginx/html/HookPHP \
letwang/hookphp bash && sudo docker exec -it hookphp bash -c "cd /usr/local/openresty/nginx/html/HookPHP/ && sh Start"

或者

全新构建 📦

sudo docker run -itd -p 81:80 -p 3307:3306 -p 6380:6379 -p 27018:27017 -p 15673:15672 -p 9002:9001 --name hookphp \
-v `pwd`/../:/usr/local/openresty/nginx/html/wwwroot \
-v `pwd`/:/usr/local/openresty/nginx/html/HookPHP \
ubuntu:20.04 bash && sudo docker exec -it hookphp bash /usr/local/openresty/nginx/html/HookPHP/Dockerfile

Demo


Container wwwroot

Local wwwroot

APCu Local Cache

MySQL

127.0.0.1
3306/3307
root
123456

Redis

127.0.0.1
6379/6380
123456

MongoDB

127.0.0.1
27017/27018

RabbitMQ

admin
123456

Supervisor