1. 更新前端界面和Nginx配置
2. 更新Dockerfile设置
This commit is contained in:
8
docker-springboot/Dockerfile
Normal file
8
docker-springboot/Dockerfile
Normal file
@@ -0,0 +1,8 @@
|
||||
FROM protection_ubuntu:latest
|
||||
LABEL authors="Endera"
|
||||
|
||||
COPY realtime_protection realtime_protection
|
||||
|
||||
EXPOSE 8081
|
||||
|
||||
ENTRYPOINT ["bash", "realtime_protection/docker-springboot/start_springboot.sh"]
|
||||
3
docker-springboot/Dockerfile.dockerignore
Normal file
3
docker-springboot/Dockerfile.dockerignore
Normal file
@@ -0,0 +1,3 @@
|
||||
../build
|
||||
../.gradle
|
||||
../log
|
||||
15
docker-springboot/prepare_springboot.sh
Normal file
15
docker-springboot/prepare_springboot.sh
Normal file
@@ -0,0 +1,15 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# 初始化变量设定
|
||||
export set BASEDIR="/root"
|
||||
export set PROTECTION_DIR="$BASEDIR/realtime_protection"
|
||||
|
||||
# 下载git仓库内容
|
||||
echo https://EnderByEndera:8Bs8hxHtE-iq44g@git.mesalab.cn > $BASEDIR/.git-credentials
|
||||
git config --global credential.helper store
|
||||
git clone https://git.mesalab.cn/EnderByEndera/realtime_protection.git $BASEDIR/realtime_protection
|
||||
|
||||
# 启动gradle
|
||||
cd $PROTECTION_DIR
|
||||
chmod +x ./gradlew
|
||||
./gradlew clean
|
||||
14
docker-springboot/start_springboot.sh
Normal file
14
docker-springboot/start_springboot.sh
Normal file
@@ -0,0 +1,14 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# 初始化变量设定
|
||||
export set BASEDIR="/root"
|
||||
export set PROTECTION_DIR="$BASEDIR/realtime_protection"
|
||||
export set GRADLE_USER_HOME="$PROTECTION_DIR/gradle"
|
||||
|
||||
# 启动gradle,编译java
|
||||
cd $PROTECTION_DIR
|
||||
chmod +x ./gradlew
|
||||
./gradlew clean && ./gradlew build
|
||||
|
||||
# 启动SpringBoot服务
|
||||
./gradlew bootRun --args="--spring.profiles.active=prod"
|
||||
Reference in New Issue
Block a user