修改dokcer文件

This commit is contained in:
2025-07-06 17:19:51 +08:00
parent bad0a02d30
commit e7c4739462
3 changed files with 8 additions and 8 deletions

8
Jenkinsfile vendored
View File

@ -4,7 +4,7 @@ pipeline {
maven 'M3' maven 'M3'
} }
environment { environment {
APP_NAME = "sczx-gateway" APP_NAME = "sczx_gateway"
DOCKER_IMAGE = "${APP_NAME}:latest" DOCKER_IMAGE = "${APP_NAME}:latest"
CONTAINER_NAME = "${APP_NAME}-container" CONTAINER_NAME = "${APP_NAME}-container"
} }
@ -50,9 +50,9 @@ pipeline {
steps { steps {
echo "🛑 正在停止旧容器..." echo "🛑 正在停止旧容器..."
sh ''' sh '''
if [ "$(docker ps -f 'name=sczx-gateway-container' --format '{{.Status}}')" ]; then if [ "$(docker ps -f 'name=sczx_gateway-container' --format '{{.Status}}')" ]; then
docker stop sczx-gateway-container docker stop sczx_gateway-container
docker rm sczx-gateway-container docker rm sczx_gateway-container
fi fi
''' '''
} }

View File

@ -5,11 +5,11 @@
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>com.sczx</groupId> <groupId>com.sczx</groupId>
<artifactId>sczx-gateway</artifactId> <artifactId>sczx_gateway</artifactId>
<version>1.0.0</version> <version>1.0.0</version>
<packaging>jar</packaging> <packaging>jar</packaging>
<name>sczx-gateway</name> <name>sczx_gateway</name>
<description>统一 API 网关服务</description> <description>统一 API 网关服务</description>
<properties> <properties>
@ -100,7 +100,7 @@
<!-- Build Configuration --> <!-- Build Configuration -->
<build> <build>
<finalName>sczx-gateway</finalName> <finalName>sczx_gateway</finalName>
<resources> <resources>
<resource> <resource>
<directory>src/main/resources</directory> <directory>src/main/resources</directory>

View File

@ -4,7 +4,7 @@ server:
spring: spring:
application: application:
name: sczx-gateway name: sczx_gateway
cloud: cloud:
gateway: gateway:
discovery: discovery: