mirror of
https://gitee.com/xtoon/xtoon-cloud.git
synced 2025-12-30 11:02:27 +00:00
支持k8s
This commit is contained in:
@@ -95,14 +95,14 @@ xtoon-could
|
||||
|
||||
## 部署
|
||||
|
||||
### 部署方式
|
||||
### 前期准备
|
||||
- 拉取前后端项目代码;
|
||||
- 安装必要的环境:jdk1.8+,mysql5.7+,redis,nodejs等;
|
||||
- mysql新建两个库,导入doc下面的sql文件;
|
||||
- 修改成本地环境配置:mysql,redis;
|
||||
- 启动前后端项目,访问地址;
|
||||
- 启动前后端项目,访问地址;#
|
||||
|
||||
### 启动顺序
|
||||
### 本地启动顺序
|
||||
- xtoon-register-server(注册配置中心)
|
||||
- xtoon-sys-server(用户服务)
|
||||
- xtoon-auth-server(认证服务)
|
||||
@@ -111,6 +111,9 @@ xtoon-could
|
||||
- xtoon-sentinel-server(流量控制服务)
|
||||
- xtoon-could-element(前端项目)
|
||||
|
||||
### 测试/生产发布
|
||||
支持jenkins pipeline + docker + harbor + k8s部署,项目开源配置文件:Dockerfile,Jenkinsfile,k8s-deployment.tpl,具体可加群讨论(QQ:13095000)
|
||||
|
||||
|
||||
## 核心理念
|
||||
### 六边形理论
|
||||
|
||||
6
xtoon-ops/xtoon-auth-server/Dockerfile
Normal file
6
xtoon-ops/xtoon-auth-server/Dockerfile
Normal file
@@ -0,0 +1,6 @@
|
||||
FROM java:8
|
||||
|
||||
VOLUME /tmp
|
||||
ADD target/xtoon-auth-server.jar app.jar
|
||||
RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && echo 'Asia/Shanghai' >/etc/timezone
|
||||
ENTRYPOINT ["java", "-Djava.security.egd=file:/dev/./urandom","-jar","/app.jar"]
|
||||
58
xtoon-ops/xtoon-auth-server/Jenkinsfile
vendored
Normal file
58
xtoon-ops/xtoon-auth-server/Jenkinsfile
vendored
Normal file
@@ -0,0 +1,58 @@
|
||||
pipeline {
|
||||
agent any
|
||||
environment {
|
||||
HARBOR_CREDS = credentials('jenkins-harbor-creds')
|
||||
K8S_CONFIG = credentials('jenkins-k8s-config')
|
||||
GIT_TAG = sh(returnStdout: true,script: 'git describe --tags --always').trim()
|
||||
}
|
||||
parameters {
|
||||
string(name: 'HARBOR_HOST', defaultValue: '192.168.99.41:30002', description: 'harbor_url')
|
||||
string(name: 'DOCKER_IMAGE', defaultValue: 'xtoon-cloud/xtoon-auth-server', description: 'docker_image_tag')
|
||||
string(name: 'APP_NAME', defaultValue: 'xtoon-auth-server', description: 'app_name')
|
||||
string(name: 'K8S_NAMESPACE', defaultValue: 'xtoon', description: 'k8s_namespace')
|
||||
}
|
||||
stages {
|
||||
stage('Maven Build') {
|
||||
agent {
|
||||
docker {
|
||||
image 'maven:3-jdk-8-alpine'
|
||||
args '-v $HOME/.m2:/root/.m2'
|
||||
}
|
||||
}
|
||||
steps {
|
||||
sh 'mvn clean package -DskipTests=true'
|
||||
}
|
||||
|
||||
}
|
||||
stage('Docker Build') {
|
||||
agent any
|
||||
steps {
|
||||
dir('xtoon-ops/xtoon-auth-server') {
|
||||
sh "docker login -u ${HARBOR_CREDS_USR} -p ${HARBOR_CREDS_PSW} ${params.HARBOR_HOST}"
|
||||
sh "docker build -t ${params.HARBOR_HOST}/${params.DOCKER_IMAGE}:${GIT_TAG} ."
|
||||
sh "docker push ${params.HARBOR_HOST}/${params.DOCKER_IMAGE}:${GIT_TAG}"
|
||||
sh "docker rmi ${params.HARBOR_HOST}/${params.DOCKER_IMAGE}:${GIT_TAG}"
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
stage('Deploy') {
|
||||
agent {
|
||||
docker {
|
||||
image 'lwolf/helm-kubectl-docker'
|
||||
}
|
||||
}
|
||||
steps {
|
||||
dir('xtoon-ops/xtoon-auth-server') {
|
||||
sh "mkdir -p ~/.kube"
|
||||
sh "echo ${K8S_CONFIG} | base64 -d > ~/.kube/config"
|
||||
sh "sed -e 's#{IMAGE_URL}#${params.HARBOR_HOST}/${params.DOCKER_IMAGE}#g;s#{IMAGE_TAG}#${GIT_TAG}#g;s#{APP_NAME}#${params.APP_NAME}#g;s#{SPRING_PROFILE}#k8s-test#g' k8s-deployment.tpl > k8s-deployment.yml"
|
||||
sh "kubectl apply -f k8s-deployment.yml --force=true --namespace=${params.K8S_NAMESPACE}"
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
36
xtoon-ops/xtoon-auth-server/k8s-deployment.tpl
Normal file
36
xtoon-ops/xtoon-auth-server/k8s-deployment.tpl
Normal file
@@ -0,0 +1,36 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: {APP_NAME}-deployment
|
||||
labels:
|
||||
app: {APP_NAME}
|
||||
spec:
|
||||
replicas: 1
|
||||
strategy:
|
||||
type: RollingUpdate
|
||||
rollingUpdate:
|
||||
maxUnavailable: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: {APP_NAME}
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: {APP_NAME}
|
||||
spec:
|
||||
terminationGracePeriodSeconds: 0
|
||||
containers:
|
||||
- name: {APP_NAME}
|
||||
image: {IMAGE_URL}:{IMAGE_TAG}
|
||||
ports:
|
||||
- containerPort: 8000
|
||||
livenessProbe:
|
||||
initialDelaySeconds: 300 #延迟加载时间
|
||||
periodSeconds: 5 #重试时间间隔
|
||||
timeoutSeconds: 10 #超时时间设置
|
||||
httpGet:
|
||||
port: 8000
|
||||
path: /actuator/health
|
||||
env:
|
||||
- name: SPRING_PROFILES_ACTIVE
|
||||
value: {SPRING_PROFILE}
|
||||
@@ -83,4 +83,14 @@
|
||||
<version>2.7.8</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<finalName>xtoon-auth-server</finalName>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
6
xtoon-ops/xtoon-gateway-server/Dockerfile
Normal file
6
xtoon-ops/xtoon-gateway-server/Dockerfile
Normal file
@@ -0,0 +1,6 @@
|
||||
FROM java:8
|
||||
|
||||
VOLUME /tmp
|
||||
ADD target/xtoon-gateway-server.jar app.jar
|
||||
RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && echo 'Asia/Shanghai' >/etc/timezone
|
||||
ENTRYPOINT ["java", "-Djava.security.egd=file:/dev/./urandom","-jar","/app.jar"]
|
||||
58
xtoon-ops/xtoon-gateway-server/Jenkinsfile
vendored
Normal file
58
xtoon-ops/xtoon-gateway-server/Jenkinsfile
vendored
Normal file
@@ -0,0 +1,58 @@
|
||||
pipeline {
|
||||
agent any
|
||||
environment {
|
||||
HARBOR_CREDS = credentials('jenkins-harbor-creds')
|
||||
K8S_CONFIG = credentials('jenkins-k8s-config')
|
||||
GIT_TAG = sh(returnStdout: true,script: 'git describe --tags --always').trim()
|
||||
}
|
||||
parameters {
|
||||
string(name: 'HARBOR_HOST', defaultValue: '192.168.99.41:30002', description: 'harbor_url')
|
||||
string(name: 'DOCKER_IMAGE', defaultValue: 'xtoon-cloud/xtoon-gateway-server', description: 'docker_image_tag')
|
||||
string(name: 'APP_NAME', defaultValue: 'xtoon-gateway-server', description: 'app_name')
|
||||
string(name: 'K8S_NAMESPACE', defaultValue: 'xtoon', description: 'k8s_namespace')
|
||||
}
|
||||
stages {
|
||||
stage('Maven Build') {
|
||||
agent {
|
||||
docker {
|
||||
image 'maven:3-jdk-8-alpine'
|
||||
args '-v $HOME/.m2:/root/.m2'
|
||||
}
|
||||
}
|
||||
steps {
|
||||
sh 'mvn clean package -DskipTests=true'
|
||||
}
|
||||
|
||||
}
|
||||
stage('Docker Build') {
|
||||
agent any
|
||||
steps {
|
||||
dir('xtoon-ops/xtoon-gateway-server') {
|
||||
sh "docker login -u ${HARBOR_CREDS_USR} -p ${HARBOR_CREDS_PSW} ${params.HARBOR_HOST}"
|
||||
sh "docker build -t ${params.HARBOR_HOST}/${params.DOCKER_IMAGE}:${GIT_TAG} ."
|
||||
sh "docker push ${params.HARBOR_HOST}/${params.DOCKER_IMAGE}:${GIT_TAG}"
|
||||
sh "docker rmi ${params.HARBOR_HOST}/${params.DOCKER_IMAGE}:${GIT_TAG}"
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
stage('Deploy') {
|
||||
agent {
|
||||
docker {
|
||||
image 'lwolf/helm-kubectl-docker'
|
||||
}
|
||||
}
|
||||
steps {
|
||||
dir('xtoon-ops/xtoon-gateway-server') {
|
||||
sh "mkdir -p ~/.kube"
|
||||
sh "echo ${K8S_CONFIG} | base64 -d > ~/.kube/config"
|
||||
sh "sed -e 's#{IMAGE_URL}#${params.HARBOR_HOST}/${params.DOCKER_IMAGE}#g;s#{IMAGE_TAG}#${GIT_TAG}#g;s#{APP_NAME}#${params.APP_NAME}#g;s#{SPRING_PROFILE}#k8s-test#g' k8s-deployment.tpl > k8s-deployment.yml"
|
||||
sh "kubectl apply -f k8s-deployment.yml --namespace=${params.K8S_NAMESPACE}"
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
36
xtoon-ops/xtoon-gateway-server/k8s-deployment.tpl
Normal file
36
xtoon-ops/xtoon-gateway-server/k8s-deployment.tpl
Normal file
@@ -0,0 +1,36 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: {APP_NAME}-deployment
|
||||
labels:
|
||||
app: {APP_NAME}
|
||||
spec:
|
||||
replicas: 2
|
||||
strategy:
|
||||
type: RollingUpdate
|
||||
rollingUpdate:
|
||||
maxUnavailable: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: {APP_NAME}
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: {APP_NAME}
|
||||
spec:
|
||||
terminationGracePeriodSeconds: 0
|
||||
containers:
|
||||
- name: {APP_NAME}
|
||||
image: {IMAGE_URL}:{IMAGE_TAG}
|
||||
ports:
|
||||
- containerPort: 10000
|
||||
livenessProbe:
|
||||
initialDelaySeconds: 300 #延迟加载时间
|
||||
periodSeconds: 5 #重试时间间隔
|
||||
timeoutSeconds: 10 #超时时间设置
|
||||
httpGet:
|
||||
port: 10000
|
||||
path: /actuator/health
|
||||
env:
|
||||
- name: SPRING_PROFILES_ACTIVE
|
||||
value: {SPRING_PROFILE}
|
||||
@@ -79,4 +79,14 @@
|
||||
<artifactId>spring-security-oauth2-jose</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<finalName>xtoon-gateway-server</finalName>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
@@ -20,6 +20,6 @@ public class IndexApi {
|
||||
*/
|
||||
@RequestMapping("/")
|
||||
public Mono<String> index() {
|
||||
return Mono.just("gamma cloud gateway");
|
||||
return Mono.just("xtoon cloud gateway");
|
||||
}
|
||||
}
|
||||
|
||||
6
xtoon-ops/xtoon-monitor-server/Dockerfile
Normal file
6
xtoon-ops/xtoon-monitor-server/Dockerfile
Normal file
@@ -0,0 +1,6 @@
|
||||
FROM java:8
|
||||
|
||||
VOLUME /tmp
|
||||
ADD target/xtoon-monitor-server.jar app.jar
|
||||
RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && echo 'Asia/Shanghai' >/etc/timezone
|
||||
ENTRYPOINT ["java", "-Djava.security.egd=file:/dev/./urandom","-jar","/app.jar"]
|
||||
58
xtoon-ops/xtoon-monitor-server/Jenkinsfile
vendored
Normal file
58
xtoon-ops/xtoon-monitor-server/Jenkinsfile
vendored
Normal file
@@ -0,0 +1,58 @@
|
||||
pipeline {
|
||||
agent any
|
||||
environment {
|
||||
HARBOR_CREDS = credentials('jenkins-harbor-creds')
|
||||
K8S_CONFIG = credentials('jenkins-k8s-config')
|
||||
GIT_TAG = sh(returnStdout: true,script: 'git describe --tags --always').trim()
|
||||
}
|
||||
parameters {
|
||||
string(name: 'HARBOR_HOST', defaultValue: '192.168.99.41:30002', description: 'harbor_url')
|
||||
string(name: 'DOCKER_IMAGE', defaultValue: 'xtoon-cloud/xtoon-monitor-server', description: 'docker_image_tag')
|
||||
string(name: 'APP_NAME', defaultValue: 'xtoon-monitor-server', description: 'app_name')
|
||||
string(name: 'K8S_NAMESPACE', defaultValue: 'xtoon', description: 'k8s_namespace')
|
||||
}
|
||||
stages {
|
||||
stage('Maven Build') {
|
||||
agent {
|
||||
docker {
|
||||
image 'maven:3-jdk-8-alpine'
|
||||
args '-v $HOME/.m2:/root/.m2'
|
||||
}
|
||||
}
|
||||
steps {
|
||||
sh 'mvn clean package -DskipTests=true'
|
||||
}
|
||||
|
||||
}
|
||||
stage('Docker Build') {
|
||||
agent any
|
||||
steps {
|
||||
dir('xtoon-ops/xtoon-monitor-server') {
|
||||
sh "docker login -u ${HARBOR_CREDS_USR} -p ${HARBOR_CREDS_PSW} ${params.HARBOR_HOST}"
|
||||
sh "docker build -t ${params.HARBOR_HOST}/${params.DOCKER_IMAGE}:${GIT_TAG} ."
|
||||
sh "docker push ${params.HARBOR_HOST}/${params.DOCKER_IMAGE}:${GIT_TAG}"
|
||||
sh "docker rmi ${params.HARBOR_HOST}/${params.DOCKER_IMAGE}:${GIT_TAG}"
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
stage('Deploy') {
|
||||
agent {
|
||||
docker {
|
||||
image 'lwolf/helm-kubectl-docker'
|
||||
}
|
||||
}
|
||||
steps {
|
||||
dir('xtoon-ops/xtoon-monitor-server') {
|
||||
sh "mkdir -p ~/.kube"
|
||||
sh "echo ${K8S_CONFIG} | base64 -d > ~/.kube/config"
|
||||
sh "sed -e 's#{IMAGE_URL}#${params.HARBOR_HOST}/${params.DOCKER_IMAGE}#g;s#{IMAGE_TAG}#${GIT_TAG}#g;s#{APP_NAME}#${params.APP_NAME}#g;s#{SPRING_PROFILE}#k8s-test#g' k8s-deployment.tpl > k8s-deployment.yml"
|
||||
sh "kubectl apply -f k8s-deployment.yml --namespace=${params.K8S_NAMESPACE}"
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
36
xtoon-ops/xtoon-monitor-server/k8s-deployment.tpl
Normal file
36
xtoon-ops/xtoon-monitor-server/k8s-deployment.tpl
Normal file
@@ -0,0 +1,36 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: {APP_NAME}-deployment
|
||||
labels:
|
||||
app: {APP_NAME}
|
||||
spec:
|
||||
replicas: 1
|
||||
strategy:
|
||||
type: RollingUpdate
|
||||
rollingUpdate:
|
||||
maxUnavailable: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: {APP_NAME}
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: {APP_NAME}
|
||||
spec:
|
||||
terminationGracePeriodSeconds: 0
|
||||
containers:
|
||||
- name: {APP_NAME}
|
||||
image: {IMAGE_URL}:{IMAGE_TAG}
|
||||
ports:
|
||||
- containerPort: 5001
|
||||
livenessProbe:
|
||||
initialDelaySeconds: 300 #延迟加载时间
|
||||
periodSeconds: 5 #重试时间间隔
|
||||
timeoutSeconds: 10 #超时时间设置
|
||||
httpGet:
|
||||
port: 5001
|
||||
path: /actuator/health
|
||||
env:
|
||||
- name: SPRING_PROFILES_ACTIVE
|
||||
value: {SPRING_PROFILE}
|
||||
@@ -56,4 +56,14 @@
|
||||
<artifactId>spring-cloud-starter-loadbalancer</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<finalName>xtoon-monitor-server</finalName>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
6
xtoon-service/xtoon-sys/xtoon-sys-server/Dockerfile
Normal file
6
xtoon-service/xtoon-sys/xtoon-sys-server/Dockerfile
Normal file
@@ -0,0 +1,6 @@
|
||||
FROM java:8
|
||||
|
||||
VOLUME /tmp
|
||||
ADD target/xtoon-sys-server.jar app.jar
|
||||
RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && echo 'Asia/Shanghai' >/etc/timezone
|
||||
ENTRYPOINT ["java", "-Djava.security.egd=file:/dev/./urandom","-jar","/app.jar"]
|
||||
58
xtoon-service/xtoon-sys/xtoon-sys-server/Jenkinsfile
vendored
Normal file
58
xtoon-service/xtoon-sys/xtoon-sys-server/Jenkinsfile
vendored
Normal file
@@ -0,0 +1,58 @@
|
||||
pipeline {
|
||||
agent any
|
||||
environment {
|
||||
HARBOR_CREDS = credentials('jenkins-harbor-creds')
|
||||
K8S_CONFIG = credentials('jenkins-k8s-config')
|
||||
GIT_TAG = sh(returnStdout: true,script: 'git describe --tags --always').trim()
|
||||
}
|
||||
parameters {
|
||||
string(name: 'HARBOR_HOST', defaultValue: '192.168.99.41:30002', description: 'harbor_url')
|
||||
string(name: 'DOCKER_IMAGE', defaultValue: 'xtoon-cloud/xtoon-sys-server', description: 'docker_image_tag')
|
||||
string(name: 'APP_NAME', defaultValue: 'xtoon-sys-server', description: 'app_name')
|
||||
string(name: 'K8S_NAMESPACE', defaultValue: 'xtoon', description: 'k8s_namespace')
|
||||
}
|
||||
stages {
|
||||
stage('Maven Build') {
|
||||
agent {
|
||||
docker {
|
||||
image 'maven:3-jdk-8-alpine'
|
||||
args '-v $HOME/.m2:/root/.m2'
|
||||
}
|
||||
}
|
||||
steps {
|
||||
sh 'mvn clean package -DskipTests=true'
|
||||
}
|
||||
|
||||
}
|
||||
stage('Docker Build') {
|
||||
agent any
|
||||
steps {
|
||||
dir('xtoon-service/xtoon-sys/xtoon-sys-server') {
|
||||
sh "docker login -u ${HARBOR_CREDS_USR} -p ${HARBOR_CREDS_PSW} ${params.HARBOR_HOST}"
|
||||
sh "docker build -t ${params.HARBOR_HOST}/${params.DOCKER_IMAGE}:${GIT_TAG} ."
|
||||
sh "docker push ${params.HARBOR_HOST}/${params.DOCKER_IMAGE}:${GIT_TAG}"
|
||||
sh "docker rmi ${params.HARBOR_HOST}/${params.DOCKER_IMAGE}:${GIT_TAG}"
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
stage('Deploy') {
|
||||
agent {
|
||||
docker {
|
||||
image 'lwolf/helm-kubectl-docker'
|
||||
}
|
||||
}
|
||||
steps {
|
||||
dir('xtoon-service/xtoon-sys/xtoon-sys-server') {
|
||||
sh "mkdir -p ~/.kube"
|
||||
sh "echo ${K8S_CONFIG} | base64 -d > ~/.kube/config"
|
||||
sh "sed -e 's#{IMAGE_URL}#${params.HARBOR_HOST}/${params.DOCKER_IMAGE}#g;s#{IMAGE_TAG}#${GIT_TAG}#g;s#{APP_NAME}#${params.APP_NAME}#g;s#{SPRING_PROFILE}#k8s-test#g' k8s-deployment.tpl > k8s-deployment.yml"
|
||||
sh "kubectl apply -f k8s-deployment.yml --namespace=${params.K8S_NAMESPACE}"
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
36
xtoon-service/xtoon-sys/xtoon-sys-server/k8s-deployment.tpl
Normal file
36
xtoon-service/xtoon-sys/xtoon-sys-server/k8s-deployment.tpl
Normal file
@@ -0,0 +1,36 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: {APP_NAME}-deployment
|
||||
labels:
|
||||
app: {APP_NAME}
|
||||
spec:
|
||||
replicas: 1
|
||||
strategy:
|
||||
type: RollingUpdate
|
||||
rollingUpdate:
|
||||
maxUnavailable: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: {APP_NAME}
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: {APP_NAME}
|
||||
spec:
|
||||
terminationGracePeriodSeconds: 0
|
||||
containers:
|
||||
- name: {APP_NAME}
|
||||
image: {IMAGE_URL}:{IMAGE_TAG}
|
||||
ports:
|
||||
- containerPort: 8001
|
||||
livenessProbe:
|
||||
initialDelaySeconds: 300 #延迟加载时间
|
||||
periodSeconds: 5 #重试时间间隔
|
||||
timeoutSeconds: 10 #超时时间设置
|
||||
httpGet:
|
||||
port: 8001
|
||||
path: /actuator/health
|
||||
env:
|
||||
- name: SPRING_PROFILES_ACTIVE
|
||||
value: {SPRING_PROFILE}
|
||||
@@ -98,6 +98,7 @@
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<finalName>xtoon-sys-server</finalName>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>src/main/resources</directory>
|
||||
@@ -112,5 +113,11 @@
|
||||
</includes>
|
||||
</resource>
|
||||
</resources>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
@@ -12,7 +12,7 @@ import java.util.Properties;
|
||||
/**
|
||||
* 生成验证码配置
|
||||
*
|
||||
* @author gamma
|
||||
* @author xtoon
|
||||
*/
|
||||
@Configuration
|
||||
public class KaptchaConfig {
|
||||
|
||||
Reference in New Issue
Block a user