This repository has been archived on 2025-09-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
enderbyendera-realtime-prot…/load_springboot.sh
PushM ae5b9da486 1、protocolnum解決
2、docker run 時間同步
2024-06-09 04:16:06 +08:00

23 lines
972 B
Bash
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/usr/bin/env bash
# 避免build等文件夹被上传引发问题
rm -rf build
rm -rf log
rm -rf .gradle
cd ..
echo "============start loading springboot============"
docker rm -f $(docker ps -a | grep springboot_backend | awk '{print $1}')
docker image rm protection_springboot
echo "============old containers and images are cleared============"
docker load < realtime_protection/docker-ubuntu/protection_ubuntu.tar
docker build -t protection_springboot -f realtime_protection/docker-springboot/Dockerfile .
echo "============built backend servers============"
# 使用privileged模式在中心部署时不会遭遇Java内存异常错误
#增加-v /etc/localtime:/etc/localtime -v /etc/timezone:/etc/timezone使容器时间与宿主机时间一致
docker run -v /etc/localtime:/etc/localtime -v /etc/timezone:/etc/timezone --privileged -itd --name springboot_backend -p 8081:8081 protection_springboot
echo "============started backend servers============"