feat: license服务端
This commit is contained in:
@@ -8,6 +8,7 @@ BERootDir=${GitRootDir}/be.wfc
|
|||||||
FERootDir=${GitRootDir}/fe.wfc
|
FERootDir=${GitRootDir}/fe.wfc
|
||||||
FEUserRootDir=${GitRootDir}/fe.wfc.user
|
FEUserRootDir=${GitRootDir}/fe.wfc.user
|
||||||
BuildRootDir=${GitRootDir}/build.wfc
|
BuildRootDir=${GitRootDir}/build.wfc
|
||||||
|
LicenseRootDir=${GitRootDir}/license.wfc
|
||||||
|
|
||||||
WFCWorkDir=/opt/wfc
|
WFCWorkDir=/opt/wfc
|
||||||
BuildDockerDir=${BuildRootDir}/build/docker
|
BuildDockerDir=${BuildRootDir}/build/docker
|
||||||
@@ -82,6 +83,8 @@ pre-git-pull(){
|
|||||||
git pull
|
git pull
|
||||||
cd ${BuildRootDir}
|
cd ${BuildRootDir}
|
||||||
git pull
|
git pull
|
||||||
|
cd ${LicenseRootDir}
|
||||||
|
git pull
|
||||||
}
|
}
|
||||||
|
|
||||||
pre-build-deb(){
|
pre-build-deb(){
|
||||||
@@ -111,6 +114,9 @@ build-jar(){
|
|||||||
cd ${BERootDir}
|
cd ${BERootDir}
|
||||||
# git pull
|
# git pull
|
||||||
mvn clean package -Dmaven.test.skip=true -P prod
|
mvn clean package -Dmaven.test.skip=true -P prod
|
||||||
|
cd ${LicenseRootDir}
|
||||||
|
# git pull
|
||||||
|
mvn clean package -Dmaven.test.skip=true
|
||||||
}
|
}
|
||||||
|
|
||||||
pre-build-src-tar(){
|
pre-build-src-tar(){
|
||||||
@@ -123,6 +129,8 @@ pre-build-src-tar(){
|
|||||||
clean-jar(){
|
clean-jar(){
|
||||||
cd ${BERootDir}
|
cd ${BERootDir}
|
||||||
mvn clean
|
mvn clean
|
||||||
|
cd ${LicenseRootDir}
|
||||||
|
mvn clean
|
||||||
}
|
}
|
||||||
|
|
||||||
build-dist(){
|
build-dist(){
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ BERootDir=${GitRootDir}/be.wfc
|
|||||||
FERootDir=${GitRootDir}/fe.wfc
|
FERootDir=${GitRootDir}/fe.wfc
|
||||||
FEUserRootDir=${GitRootDir}/fe.wfc.user
|
FEUserRootDir=${GitRootDir}/fe.wfc.user
|
||||||
BuildRootDir=${GitRootDir}/build.wfc
|
BuildRootDir=${GitRootDir}/build.wfc
|
||||||
|
LicenseRootDir=${GitRootDir}/license.wfc
|
||||||
I18nResourcesDir=${BERootDir}/wfc-common/wfc-common-core/src/main/resources
|
I18nResourcesDir=${BERootDir}/wfc-common/wfc-common-core/src/main/resources
|
||||||
|
|
||||||
WFCWorkDir=/opt/wfc
|
WFCWorkDir=/opt/wfc
|
||||||
@@ -87,3 +88,7 @@ echo "done"
|
|||||||
echo -n "Begin copy wfc-modules-payment ... "
|
echo -n "Begin copy wfc-modules-payment ... "
|
||||||
cp -rf ${BERootDir}/wfc-modules/wfc-payment/target/wfc-modules-payment.jar ${BuildDockerDir}/wfc/modules/payment/jar
|
cp -rf ${BERootDir}/wfc-modules/wfc-payment/target/wfc-modules-payment.jar ${BuildDockerDir}/wfc/modules/payment/jar
|
||||||
echo "done"
|
echo "done"
|
||||||
|
|
||||||
|
echo -n "Begin copy wfc-license-server ... "
|
||||||
|
cp -rf ${LicenseRootDir}/target/wfc-license-server-1.0.0.jar ${BuildDockerDir}/license-server/jar
|
||||||
|
echo "done"
|
||||||
|
|||||||
12
build/docker/license-server/docker-compose.yml
Normal file
12
build/docker/license-server/docker-compose.yml
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
version: '3.8'
|
||||||
|
services:
|
||||||
|
wfc-license-serve:
|
||||||
|
# 使用前面创建的Dockerfile构建的镜像
|
||||||
|
build: .
|
||||||
|
# 指定容器名(可选)
|
||||||
|
container_name: wfc-license-server
|
||||||
|
# 指定端口映射(例如,将容器的8080端口映射到主机的8080端口)
|
||||||
|
ports:
|
||||||
|
- "8070:8070"
|
||||||
|
volumes:
|
||||||
|
- ./license:/opt/license
|
||||||
15
build/docker/license-server/dockerfile
Normal file
15
build/docker/license-server/dockerfile
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
# 基础镜像
|
||||||
|
FROM openjdk:8-jre
|
||||||
|
# author
|
||||||
|
LABEL org.wfc.image.authors="wfc@wfc.org"
|
||||||
|
|
||||||
|
# 挂载目录
|
||||||
|
VOLUME /opt/wfc
|
||||||
|
# 创建目录
|
||||||
|
RUN mkdir -p /opt/wfc
|
||||||
|
# 指定路径
|
||||||
|
WORKDIR /opt/wfc
|
||||||
|
# 复制jar文件到路径
|
||||||
|
COPY jar/wfc-license-server-1.0.0.jar /opt/wfc/wfc-license-server.jar
|
||||||
|
# 启动licese-serve服务
|
||||||
|
ENTRYPOINT ["java","-jar","wfc-license-server.jar"]
|
||||||
1
build/docker/license-server/jar/readme.txt
Normal file
1
build/docker/license-server/jar/readme.txt
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>֤<EFBFBD><EFBFBD><EFBFBD>Ĵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>õ<EFBFBD>jar<EFBFBD>ļ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>docker<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ӧ<EFBFBD>á<EFBFBD>
|
||||||
47
build/docker/license-server/licensecontrol.sh
Normal file
47
build/docker/license-server/licensecontrol.sh
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
WFCWorkDir=/opt/wfc
|
||||||
|
DockerDir=${WFCWorkDir}/docker/license-server
|
||||||
|
DockerCompose=docker-compose
|
||||||
|
PIDFile=/run/licensecontrol.pid
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
start)
|
||||||
|
cd ${DockerDir}
|
||||||
|
if [ -z "$2" ]; then
|
||||||
|
${DockerCompose} up -d
|
||||||
|
echo $! > ${PIDFile}
|
||||||
|
else
|
||||||
|
${DockerCompose} up -d $2
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
stop)
|
||||||
|
cd ${DockerDir}
|
||||||
|
if [ -z "$2" ]; then
|
||||||
|
${DockerCompose} stop
|
||||||
|
if [ -f ${PIDFile} ]; then
|
||||||
|
rm ${PIDFile}
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
${DockerCompose} stop $2
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
restart)
|
||||||
|
$0 stop $2
|
||||||
|
sleep 1
|
||||||
|
$0 start $2
|
||||||
|
;;
|
||||||
|
status)
|
||||||
|
cd ${DockerDir}
|
||||||
|
if [ -z "$2" ]; then
|
||||||
|
${DockerCompose} ps
|
||||||
|
else
|
||||||
|
${DockerCompose} ps $2
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "License Server Service ... "
|
||||||
|
echo "Usage: $0 start|stop|restart|status"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
Reference in New Issue
Block a user