fix(deploy): publish unified services to temporary gray environment

This commit is contained in:
2026-10-07 11:02:47 +08:00
parent 6346e7bd95
commit ec0c06ff88
9 changed files with 211 additions and 72 deletions
+21 -20
View File
@@ -1,4 +1,4 @@
name: firstleg-test
name: firstleg-${DEPLOY_ENV:-test}
x-common: &common
restart: "on-failure:3"
@@ -8,17 +8,17 @@ x-common: &common
extra_hosts:
- "host.docker.internal:host-gateway"
environment: &common-environment
DEPLOY_ENV: test
DEPLOY_ENV: ${DEPLOY_ENV:-test}
BAIYUE_RELEASE_ID: ${RELEASE_ID:-local}
BAIYUE_RUNTIME_SCHEDULING_ENABLED: ${BAIYUE_RUNTIME_SCHEDULING_ENABLED:-true}
SERVER_SHUTDOWN: graceful
SPRING_LIFECYCLE_TIMEOUT_PER_SHUTDOWN_PHASE: ${SHUTDOWN_PHASE_TIMEOUT:-30s}
SPRING_PROFILES_ACTIVE: test
SPRING_PROFILES_ACTIVE: ${DEPLOY_ENV:-test}
NACOS_SERVER_ADDR: ${NACOS_SERVER_ADDR}
NACOS_USERNAME: ${NACOS_USERNAME}
NACOS_PASSWORD: ${NACOS_PASSWORD}
NACOS_GROUP: ${NACOS_GROUP:-BAIYUE}
NACOS_NAMESPACE: ${NACOS_NAMESPACE:?actual TEST namespace ID required}
NACOS_NAMESPACE: ${NACOS_NAMESPACE:?actual environment namespace ID required}
REDIS_HOST: ${REDIS_HOST}
REDIS_PORT: ${REDIS_PORT:-6379}
REDIS_PASSWORD: ${REDIS_PASSWORD}
@@ -32,7 +32,7 @@ x-common: &common
REDIS_TOKEN_KEY_PREFIX: ${REDIS_TOKEN_KEY_PREFIX:-baiyue:auth}
SPRING_SQL_INIT_MODE: never
ROCKETMQ_NAME_SERVER: ${ROCKETMQ_NAME_SERVER}
MQ_TOPIC_PREFIX: test-
MQ_TOPIC_PREFIX: ${MQ_TOPIC_PREFIX:-test-}
INTERNAL_SERVICE_TOKEN: ${INTERNAL_SERVICE_TOKEN}
BAIYUE_AUDIT_ENDPOINT: http://audit-service:9700/internal/audit/events
SERVER_MAX_HTTP_REQUEST_HEADER_SIZE: ${SERVER_MAX_HTTP_REQUEST_HEADER_SIZE:-32KB}
@@ -50,11 +50,12 @@ services:
gateway:
<<: *common
image: ${IMAGE_REPOSITORY}/gateway:${IMAGE_TAG}
container_name: firstleg-test-gateway
container_name: firstleg-${DEPLOY_ENV:-test}-gateway
ports: ["${PUBLISHED_BIND_ADDRESS:-127.0.0.1}:${GATEWAY_PUBLISHED_PORT:-${GATEWAY_PORT:-9000}}:9000"]
environment:
<<: *common-environment
SERVER_PORT: 9000
SPRING_PROFILES_ACTIVE: ${DEPLOY_ENV:-test},cn
SWAGGER_ENABLED: ${SWAGGER_ENABLED:-false}
CORS_ALLOWED_ORIGINS: ${CORS_ALLOWED_ORIGINS}
CORS_ALLOW_CREDENTIALS: ${CORS_ALLOW_CREDENTIALS:-false}
@@ -62,7 +63,7 @@ services:
auth:
<<: *common
image: ${IMAGE_REPOSITORY}/auth:${IMAGE_TAG}
container_name: firstleg-test-auth
container_name: firstleg-${DEPLOY_ENV:-test}-auth
expose: ["9100"]
environment:
<<: *common-environment
@@ -76,7 +77,7 @@ services:
iam:
<<: *common
image: ${IMAGE_REPOSITORY}/iam:${IMAGE_TAG}
container_name: firstleg-test-iam
container_name: firstleg-${DEPLOY_ENV:-test}-iam
expose: ["9201"]
environment:
<<: *common-environment
@@ -90,7 +91,7 @@ services:
firstleg:
<<: *common
image: ${IMAGE_REPOSITORY}/firstleg:${IMAGE_TAG}
container_name: firstleg-test-business
container_name: firstleg-${DEPLOY_ENV:-test}-business
expose: ["9202"]
environment:
<<: *common-environment
@@ -133,7 +134,7 @@ services:
finance:
<<: *common
image: ${IMAGE_REPOSITORY}/finance:${IMAGE_TAG}
container_name: firstleg-test-finance
container_name: firstleg-${DEPLOY_ENV:-test}-finance
expose: ["9203"]
environment:
<<: *common-environment
@@ -156,7 +157,7 @@ services:
order:
<<: *common
image: ${IMAGE_REPOSITORY}/order:${IMAGE_TAG}
container_name: firstleg-test-order
container_name: firstleg-${DEPLOY_ENV:-test}-order
expose: ["9204"]
environment:
<<: *common-environment
@@ -168,7 +169,7 @@ services:
warehouse:
<<: *common
image: ${IMAGE_REPOSITORY}/warehouse:${IMAGE_TAG}
container_name: firstleg-test-warehouse
container_name: firstleg-${DEPLOY_ENV:-test}-warehouse
expose: ["9205"]
environment:
<<: *common-environment
@@ -180,7 +181,7 @@ services:
file:
<<: *common
image: ${IMAGE_REPOSITORY}/file:${IMAGE_TAG}
container_name: firstleg-test-file
container_name: firstleg-${DEPLOY_ENV:-test}-file
expose: ["9206"]
volumes:
- "${FILE_UPLOADS_HOST_DIR:-/data/firstleg/uploads}:/data/files"
@@ -202,7 +203,7 @@ services:
print:
<<: *common
image: ${IMAGE_REPOSITORY}/print:${IMAGE_TAG}
container_name: firstleg-test-print
container_name: firstleg-${DEPLOY_ENV:-test}-print
expose: ["9207"]
environment:
<<: *common-environment
@@ -212,7 +213,7 @@ services:
integration-service:
<<: *common
image: ${IMAGE_REPOSITORY}/integration-service:${IMAGE_TAG}
container_name: firstleg-test-integration
container_name: firstleg-${DEPLOY_ENV:-test}-integration
expose: ["9210"]
environment:
<<: *common-environment
@@ -261,7 +262,7 @@ services:
audit-service:
<<: *common
image: ${IMAGE_REPOSITORY}/audit-service:${IMAGE_TAG}
container_name: firstleg-test-audit
container_name: firstleg-${DEPLOY_ENV:-test}-audit
expose: ["9700"]
environment:
<<: *common-environment
@@ -276,7 +277,7 @@ services:
lastleg-service:
<<: *common
image: ${IMAGE_REPOSITORY}/lastleg-service:${IMAGE_TAG}
container_name: firstleg-test-lastleg
container_name: firstleg-${DEPLOY_ENV:-test}-lastleg
expose: ["9303"]
environment:
<<: *common-environment
@@ -303,7 +304,7 @@ services:
warehouse-overseas-service:
<<: *common
image: ${IMAGE_REPOSITORY}/warehouse-overseas-service:${IMAGE_TAG}
container_name: firstleg-test-warehouse-overseas
container_name: firstleg-${DEPLOY_ENV:-test}-warehouse-overseas
expose: ["9305"]
environment:
<<: *common-environment
@@ -316,7 +317,7 @@ services:
networks:
firstleg-network:
name: firstleg-test-network
name: firstleg-${DEPLOY_ENV:-test}-network
infra-network:
external: true
name: ${INFRA_NETWORK:-firstleg-test-infra-network}
name: ${INFRA_NETWORK:-firstleg-${DEPLOY_ENV:-test}-infra-network}