|
@@ -111,13 +111,13 @@ pipeline {
|
|
|
if (params.profile == "test") {
|
|
if (params.profile == "test") {
|
|
|
SWARM_INIT_REPLICAS_NUM = 1
|
|
SWARM_INIT_REPLICAS_NUM = 1
|
|
|
SERVER_HOST = "test1.storlead.com"
|
|
SERVER_HOST = "test1.storlead.com"
|
|
|
- API_PORT = 10060
|
|
|
|
|
- API_REMOTE_DEBUG_PORT = 10061
|
|
|
|
|
|
|
+ API_PORT = 10030
|
|
|
|
|
+ API_REMOTE_DEBUG_PORT = 10031
|
|
|
SERVER_HOST_NAME = "test1"
|
|
SERVER_HOST_NAME = "test1"
|
|
|
} else if (params.profile == "prod") {
|
|
} else if (params.profile == "prod") {
|
|
|
SERVER_HOST = "110.41.82.21"
|
|
SERVER_HOST = "110.41.82.21"
|
|
|
- API_PORT = 10060
|
|
|
|
|
- API_REMOTE_DEBUG_PORT = 10061
|
|
|
|
|
|
|
+ API_PORT = 10030
|
|
|
|
|
+ API_REMOTE_DEBUG_PORT = 10031
|
|
|
SERVER_HOST_NAME = "node1"
|
|
SERVER_HOST_NAME = "node1"
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -298,9 +298,17 @@ pipeline {
|
|
|
placement:
|
|
placement:
|
|
|
constraints:
|
|
constraints:
|
|
|
- 'node.hostname == ${SERVER_HOST_NAME}'
|
|
- 'node.hostname == ${SERVER_HOST_NAME}'
|
|
|
|
|
+
|
|
|
|
|
+ resources:
|
|
|
|
|
+ limits:
|
|
|
|
|
+ memory: 2G
|
|
|
|
|
+ reservations:
|
|
|
|
|
+ memory: 512M
|
|
|
|
|
+
|
|
|
update_config:
|
|
update_config:
|
|
|
parallelism: 1
|
|
parallelism: 1
|
|
|
delay: 1m
|
|
delay: 1m
|
|
|
|
|
+
|
|
|
restart_policy:
|
|
restart_policy:
|
|
|
condition: on-failure
|
|
condition: on-failure
|
|
|
# 最多连续重试3次如果仍然失败则放弃重试
|
|
# 最多连续重试3次如果仍然失败则放弃重试
|
|
@@ -314,6 +322,7 @@ pipeline {
|
|
|
environment:
|
|
environment:
|
|
|
- "TZ=Asia/Shanghai"
|
|
- "TZ=Asia/Shanghai"
|
|
|
- "SPRING_PROFILES_ACTIVE=${params.profile}"
|
|
- "SPRING_PROFILES_ACTIVE=${params.profile}"
|
|
|
|
|
+ - "JAVA_OPTS=-Xms512m -Xmx1024m"
|
|
|
volumes:
|
|
volumes:
|
|
|
- /app:/app
|
|
- /app:/app
|
|
|
- /mnt/vdb/storlead:/mnt/vdb/storlead
|
|
- /mnt/vdb/storlead:/mnt/vdb/storlead
|