添加 集群配置文件

This commit is contained in:
iVampireSP.com 2023-02-08 20:44:59 +08:00
parent 459e7a8bcf
commit dfeb94c262
No known key found for this signature in database
GPG Key ID: 2F7B001CA27A8132
6 changed files with 26 additions and 1 deletions

View File

@ -8,7 +8,7 @@ ### 主节点运行
```bash
docker run -itd --name=lae_schedule --init --restart=always --net=host -v /opt/lae:/opt/lae ccr.ccs.tencentyun.com/laecloud/cafe:latte art schedule:work
docker run -itd --name=lae_workers --init --restart=always --net=host -v /opt/lae:/opt/lae ccr.ccs.tencentyun.com/laecloud/cafe:latte art queue:work --queue=default,host-cost
docker run -itd --name=lae_worker --init --restart=always --net=host -v /opt/lae:/opt/lae ccr.ccs.tencentyun.com/laecloud/cafe:latte art queue:work --queue=default,host-cost
```
### Web 节点运行

13
bin/add_art.sh Normal file
View File

@ -0,0 +1,13 @@
#!/bin/bash
mkdir -p /opt/lae
{
echo "alias latte='docker run -it --rm --init --net=host -v /opt/lae:/opt/lae ccr.ccs.tencentyun.com/laecloud/cafe:latte'"
echo "alias art='docker run -it --rm --init --net=host -v /opt/lae:/opt/lae ccr.ccs.tencentyun.com/laecloud/cafe:latte php /opt/lae/artisan'"
echo "alias composer='latte composer'"
echo "alias php='latte php'"
echo "alias lae='cd /opt/lae'"
} >>~/.bashrc
echo "Done! Please run 'source ~/.bashrc' to make it work."

3
bin/restart_all.sh Normal file
View File

@ -0,0 +1,3 @@
#!/bin/bash
docker restart lae lae_schedule lae_worker

3
bin/restart_queue.sh Normal file
View File

@ -0,0 +1,3 @@
#!/bin/bash
art queue:restart

3
bin/restart_schedule.sh Normal file
View File

@ -0,0 +1,3 @@
#!/bin/bash
docker restart lae_schedule

3
bin/restart_web.sh Normal file
View File

@ -0,0 +1,3 @@
#!/bin/bash
docker restart lae