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
zhaoyixiang-realtime-protec…/load_nginx.sh
EnderByEndera c806444935 1. 前端界面更新,添加部分按钮
2. README更新项目启动方式
3. 修改Docker启动脚本,使用--privileged和--host模式启动
2024-01-27 02:34:51 +08:00

24 lines
890 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 nginx============"
docker rm -f $(docker ps -a | grep nginx_frontend | awk '{print $1}')
docker image rm protection_nginx
echo "============old containers and images are cleared============"
docker load < realtime_protection/docker-ubuntu/protection_ubuntu.tar
docker build -t protection_nginx -f realtime_protection/docker-nginx/Dockerfile .
echo "============built frontend servers============"
# 使用host模式进行Nginx服务器部署方便在中心部署时不会遭遇容器内部无法访问外部网络的问题
# 使用privileged模式防止中心部署时无法启动Nginx服务器
docker run --privileged --network host -itd --name nginx_frontend protection_nginx
echo "============started frontend servers============"