From 7e87e7e985fc4b4819e70a0c44e3d900bfeefb86 Mon Sep 17 00:00:00 2001 From: xiaoxia Date: Fri, 3 Jul 2026 23:17:52 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20infra.yml=E5=AE=B9=E5=99=A8=E5=90=8D?= =?UTF-8?q?=E5=8A=A0-staging=E5=90=8E=E7=BC=80=EF=BC=8C=E4=B8=8Edeploy?= =?UTF-8?q?=E8=84=9A=E6=9C=AC=E5=91=BD=E5=90=8D=E8=A7=84=E8=8C=83=E4=B8=80?= =?UTF-8?q?=E8=87=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- infra/docker/infra.yml | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) mode change 100644 => 100755 infra/docker/infra.yml diff --git a/infra/docker/infra.yml b/infra/docker/infra.yml old mode 100644 new mode 100755 index b34d13e8f..98ca19bd6 --- a/infra/docker/infra.yml +++ b/infra/docker/infra.yml @@ -1,4 +1,4 @@ -version: '3.8' +name: xiaoxia-staging # =========================================== # 日志轮转配置(所有服务共享) @@ -10,35 +10,35 @@ x-logging: &default-logging max-file: "3" services: - postgres: + postgres-staging: image: postgres:16 - container_name: xiaoxia-postgres + container_name: xiaoxia-postgres-staging restart: always environment: - POSTGRES_DB: xiaoxia_saas - POSTGRES_USER: xiaoxia - POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-changeme_in_production} + POSTGRES_DB: ${POSTGRES_DB:-xiaoxia_saas_staging} + POSTGRES_USER: ${POSTGRES_USER:-xiaoxia} + POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-changeme_in_staging} ports: - - "127.0.0.1:5432:5432" + - "127.0.0.1:${POSTGRES_PORT:-5434}:5432" volumes: - - postgres_data:/var/lib/postgresql/data + - postgres_staging_data:/var/lib/postgresql/data networks: - xiaoxia-net logging: *default-logging healthcheck: - test: ["CMD-SHELL", "pg_isready -U xiaoxia"] + test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-xiaoxia} -d ${POSTGRES_DB:-xiaoxia_saas_staging}"] interval: 30s timeout: 5s retries: 5 - redis: + redis-staging: image: redis:7 - container_name: xiaoxia-redis + container_name: xiaoxia-redis-staging restart: always ports: - - "127.0.0.1:6379:6379" + - "127.0.0.1:${REDIS_PORT:-6381}:6379" volumes: - - redis_data:/data + - redis_staging_data:/data networks: - xiaoxia-net logging: *default-logging @@ -49,9 +49,10 @@ services: retries: 5 volumes: - postgres_data: - redis_data: + postgres_staging_data: + redis_staging_data: networks: xiaoxia-net: + external: true name: xiaoxia-net-staging