README-usage.bash 1.5 KB

1234567891011121314151617181920212223242526272829303132333435
  1. ## USAGE
  2. echo "操作:构建启动" \
  3. && project_path="/home/sri/repositories/repositories/SRI-DINO.Server-py/sri-server-bg01" \
  4. && cd ${project_path} \
  5. && sudo docker-compose --file compose.yml down \
  6. && sudo docker-compose --file compose.yml up --detach --build \
  7. && sudo docker-compose --file compose.yml logs --follow
  8. echo "操作:调试" \
  9. && project_path="/home/sri/repositories/repositories/SRI-DINO.Server-py/sri-server-bg01" \
  10. && cd ${project_path} \
  11. && sudo docker-compose --file compose.yml down \
  12. && sudo docker-compose --file compose.yml up --detach --build \
  13. && sudo docker exec -it sri_module_agent_001 bash
  14. echo "操作:强制构建并运行" \
  15. && project_path="/home/sri/repositories/repositories/SRI-DINO.Server-py/sri-server-bg01" \
  16. && cd ${project_path} \
  17. && sudo docker-compose --file compose.yml down \
  18. && sudo docker-compose --file compose.yml build --no-cache \
  19. && sudo docker-compose --file compose.yml up --detach \
  20. && sudo docker-compose --file compose.yml logs --follow
  21. echo "操作:重启" \
  22. && project_path="/home/sri/repositories/repositories/SRI-DINO.Server-py/sri-server-bg01" \
  23. && cd ${project_path} \
  24. && sudo docker-compose --file compose.yml down \
  25. && sudo docker-compose --file compose.yml up --detach \
  26. && sudo docker-compose --file compose.yml logs --follow
  27. # 日常调试命令
  28. sudo chmod -R 777 /home/ubuntu/repositories/repositories
  29. sudo chmod -R 777 /home/server/repositories/repositories
  30. sudo docker restart sri-module-bg01 && sudo docker logs -f sri-module-bg01