优化
This commit is contained in:
@@ -64,7 +64,7 @@ env_file_value() {
|
||||
}
|
||||
|
||||
case "$SERVICE" in
|
||||
gateway-overseas|lastleg-service|warehouse-overseas-service|overseas-security-service)
|
||||
gateway-overseas|lastleg-service|warehouse-overseas-service)
|
||||
COMPOSE_FILE="deploy/docker-compose.overseas.yml"
|
||||
PROJECT_NAME="firstleg-$DEPLOY_ENV-overseas"
|
||||
;;
|
||||
@@ -98,15 +98,6 @@ if [ "$SERVICE" = "gateway-overseas" ]; then
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$SERVICE" = "overseas-security-service" ]; then
|
||||
for key in OVERSEAS_SECURITY_DB_URL OVERSEAS_SECURITY_DB_USERNAME OVERSEAS_SECURITY_DB_PASSWORD; do
|
||||
if ! env_file_has_key "$key" || [ -z "$(env_file_value "$key")" ]; then
|
||||
echo "部署 overseas-security-service 时,环境文件必须包含非空 $key" >&2
|
||||
exit 2
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
for file in "$ENV_FILE" "$COMPOSE_FILE"; do
|
||||
if [ ! -f "$file" ]; then
|
||||
echo "必需文件不存在: $file" >&2
|
||||
@@ -124,7 +115,7 @@ if [ "$SERVICE" = "finance" ]; then
|
||||
fi
|
||||
|
||||
case "$SERVICE" in
|
||||
gateway-overseas|lastleg-service|warehouse-overseas-service|overseas-security-service)
|
||||
gateway-overseas|lastleg-service|warehouse-overseas-service)
|
||||
for key in NACOS_SERVER_ADDR OVERSEAS_NACOS_NAMESPACE INTERNAL_SERVICE_TOKEN JWT_ISSUER OVERSEAS_JWT_AUDIENCE JWT_JWK_SET_URI; do
|
||||
if ! env_file_has_key "$key" || [ -z "$(env_file_value "$key")" ]; then
|
||||
echo "部署海外服务时,环境文件必须包含非空 $key" >&2
|
||||
|
||||
Reference in New Issue
Block a user