feat(N/A): 调整容器内运行端口为统一的8888,方便使用一个dockerfile,就可以配置全部的健康检查

This commit is contained in:
guo
2025-10-26 15:00:55 +08:00
parent 21b539b696
commit 3336915a3e
6 changed files with 7 additions and 7 deletions
+2 -2
View File
@@ -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
View File
@@ -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
View File
@@ -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') {
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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:
+1 -1
View File
@@ -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: