12345678910111213141516171819202122232425262728293031323334353637 |
- ## USAGE
- # 一、构建操作
- # 构建启动
- echo "BEGIN:" \
- && project_path="/home/server/repositories/repositories/casperz.py-project/project-fastapi-bg" \
- && cd ${project_path} \
- && sudo docker-compose --file compose.yml down \
- && sudo docker-compose --file compose.yml up --detach --build \
- && sudo docker-compose --file compose.yml logs --follow
- # 调试
- echo "BEGIN:" \
- && project_path="/home/server/repositories/repositories/casperz.py-project/project-fastapi-bg" \
- && cd ${project_path} \
- && sudo docker-compose --file compose.yml down \
- && sudo docker-compose --file compose.yml up --detach --build \
- && sudo docker exec -it sri_module_agent_001 bash
- # 强制构建并运行
- echo "BEGIN:" \
- && project_path="/home/server/repositories/repositories/casperz.py-project/project-fastapi-bg" \
- && cd ${project_path} \
- && sudo docker-compose --file compose.yml down \
- && sudo docker-compose --file compose.yml build --no-cache \
- && sudo docker-compose --file compose.yml up --detach \
- && sudo docker-compose --file compose.yml logs --follow
- # 重启
- echo "BEGIN:" \
- && project_path="/home/server/repositories/repositories/casperz.py-project/project-fastapi-bg" \
- && cd ${project_path} \
- && sudo docker-compose --file compose.yml down \
- && sudo docker-compose --file compose.yml up --detach \
- && sudo docker-compose --file compose.yml logs --follow
- # 二、日常调试命令
- sudo chmod -R 777 /home/ubuntu/repositories/repositories
- sudo chmod -R 777 /home/server/repositories/repositories
- sudo docker restart sri-module-bg01 && sudo docker logs -f sri-module-bg01
|