README-usage.bash 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. ## NOTE
  2. echo "执行:构建调试" \
  3. && project_path="/home/server/repositories/repositories/sri-project.demo-py/sri-server-bg03" \
  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 exec -it sri-server-bg03 bash
  8. echo "执行:初装启动" \
  9. && project_path="/home/server/repositories/repositories/sri-project.demo-py/sri-server-bg03" \
  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-compose --file compose.yml logs --follow
  14. echo "执行:开发调试" \
  15. && project_path="/home/server/repositories/repositories/sri-project.demo-py/sri-server-bg03" \
  16. && cd ${project_path} \
  17. && sudo docker-compose --file compose.yml down \
  18. && sudo docker-compose --file compose.yml up --detach \
  19. && sudo docker exec -it sri-server-bg03 bash
  20. echo "执行:停服更新" \
  21. && project_path="/home/server/repositories/repositories/sri-project.demo-py/sri-server-bg03" \
  22. && cd ${project_path} \
  23. && sudo docker-compose --file compose.yml down \
  24. && sudo docker-compose --file compose.yml up --detach \
  25. && sudo docker-compose --file compose.yml logs --follow
  26. echo "执行:代码更新" \
  27. && project_path="/home/server/repositories/repositories/sri-project.demo-py/sri-server-bg03" \
  28. && cd ${project_path} \
  29. && sudo docker-compose --file compose.yml restart \
  30. && sudo docker-compose --file compose.yml logs --follow
  31. echo "执行:跟踪日志" \
  32. && project_path="/home/server/repositories/repositories/sri-project.demo-py/sri-server-bg03" \
  33. && cd ${project_path} \
  34. && sudo docker-compose --file compose.yml logs --follow