feat(N/A): 调整容器内运行端口为统一的8888,方便使用一个dockerfile,就可以配置全部的健康检查
This commit is contained in:
+2
-2
@@ -8,10 +8,10 @@ WORKDIR /app
|
|||||||
COPY target/LPT.jar LPT.jar
|
COPY target/LPT.jar LPT.jar
|
||||||
|
|
||||||
# 暴露应用运行的端口
|
# 暴露应用运行的端口
|
||||||
EXPOSE 5157
|
EXPOSE 8888
|
||||||
|
|
||||||
# 启动应用
|
# 启动应用
|
||||||
ENTRYPOINT ["java", "-jar", "LPT.jar"]
|
ENTRYPOINT ["java", "-jar", "LPT.jar"]
|
||||||
|
|
||||||
# 健康检查
|
# 健康检查
|
||||||
HEALTHCHECK --interval=10s --timeout=5s CMD curl --fail http://localhost:5157/actuator/health || exit 1
|
HEALTHCHECK --interval=10s --timeout=5s CMD curl --fail http://localhost:8888/actuator/health || exit 1
|
||||||
|
|||||||
Vendored
+1
-1
@@ -4,7 +4,7 @@ pipeline {
|
|||||||
IMAGE_NAME = 'lpt-prod:0.0'
|
IMAGE_NAME = 'lpt-prod:0.0'
|
||||||
CONTAINER_NAME = 'LPT-prod'
|
CONTAINER_NAME = 'LPT-prod'
|
||||||
HOST_PORT = '5157'
|
HOST_PORT = '5157'
|
||||||
CONTAINER_PORT = '5157'
|
CONTAINER_PORT = '8888'
|
||||||
}
|
}
|
||||||
stages {
|
stages {
|
||||||
stage('Build') {
|
stage('Build') {
|
||||||
|
|||||||
+1
-1
@@ -4,7 +4,7 @@ pipeline {
|
|||||||
IMAGE_NAME = 'lpt-dev:0.0'
|
IMAGE_NAME = 'lpt-dev:0.0'
|
||||||
CONTAINER_NAME = 'LPT-dev'
|
CONTAINER_NAME = 'LPT-dev'
|
||||||
HOST_PORT = '5155'
|
HOST_PORT = '5155'
|
||||||
CONTAINER_PORT = '5155'
|
CONTAINER_PORT = '8888'
|
||||||
}
|
}
|
||||||
stages {
|
stages {
|
||||||
stage('Build') {
|
stage('Build') {
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ spring:
|
|||||||
username: root
|
username: root
|
||||||
password: GUOxy5157
|
password: GUOxy5157
|
||||||
server:
|
server:
|
||||||
port: 5155
|
port: 8888
|
||||||
|
|
||||||
cors:
|
cors:
|
||||||
allowCredentials: true
|
allowCredentials: true
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ spring:
|
|||||||
username: root
|
username: root
|
||||||
password: GUOxy.5157
|
password: GUOxy.5157
|
||||||
server:
|
server:
|
||||||
port: 5157
|
port: 8888
|
||||||
|
|
||||||
cors:
|
cors:
|
||||||
allowed-origins:
|
allowed-origins:
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ spring:
|
|||||||
username: root
|
username: root
|
||||||
password: GUOxy5157
|
password: GUOxy5157
|
||||||
server:
|
server:
|
||||||
port: 5156
|
port: 8888
|
||||||
|
|
||||||
cors:
|
cors:
|
||||||
allowed-origins:
|
allowed-origins:
|
||||||
|
|||||||
Reference in New Issue
Block a user