README-usage.bash 1.2 KB

1234567891011121314151617181920212223242526272829
  1. ## NOTE
  2. # 一、构建操作
  3. # 调试
  4. echo "BEGIN:" \
  5. && project_path="/home/ubuntu/repositories/repositories/casperz.py-project/project-fastapi-hs" \
  6. && cd ${project_path} \
  7. && sudo docker-compose --file compose.yml down \
  8. && sudo docker-compose --file compose.yml up --detach --build \
  9. && sudo docker exec -it sri-module-server-fastapi bash
  10. # 启动
  11. echo "BEGIN:" \
  12. && project_path="/home/ubuntu/repositories/repositories/casperz.py-project/project-fastapi-hs" \
  13. && cd ${project_path} \
  14. && sudo docker-compose --file compose.yml down \
  15. && sudo docker-compose --file compose.yml up --detach --build \
  16. && sudo docker-compose --file compose.yml logs --follow
  17. # 强制构建并运行
  18. echo "BEGIN:" \
  19. && project_path="/home/ubuntu/repositories/repositories/casperz.py-project/project-fastapi-hs" \
  20. && cd ${project_path} \
  21. && sudo docker-compose --file compose.yml down \
  22. && sudo docker-compose --file compose.yml build --no-cache \
  23. && sudo docker-compose --file compose.yml up --detach \
  24. && sudo docker logs --follow sri-module-server-flask
  25. # 二、日常调试命令
  26. sudo chmod -R 777 /home/ubuntu/repositories/repositories
  27. sudo docker restart sri-module-hs01 && sudo docker logs -f sri-module-hs01