## NOTE
# 一、构建操作
# 调试
echo "BEGIN:" \
&& project_path="/home/ubuntu/repositories/repositories/casperz.py-project/project-fastapi-hs" \
&& 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-server-fastapi bash
# 启动
echo "BEGIN:" \
&& project_path="/home/ubuntu/repositories/repositories/casperz.py-project/project-fastapi-hs" \
&& 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/ubuntu/repositories/repositories/casperz.py-project/project-fastapi-hs" \
&& 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 logs --follow sri-module-server-flask
# 二、日常调试命令
sudo chmod -R 777 /home/ubuntu/repositories/repositories
sudo docker restart sri-module-hs01 && sudo docker logs -f sri-module-hs01