a5f1d9685d
Deploy / Staging E2E Tests (push) Has been skipped
Deploy / Build Production Runtime Images (push) Has been skipped
Deploy / Deploy Production (push) Has been skipped
Deploy / Production Browser E2E (push) Has been skipped
Deploy / Deploy Staging (push) Failing after 141h44m9s
CI/CD Pipeline / Frontend Lint (push) Failing after 141h44m18s
CI/CD Pipeline / Validate Code Quality And Tests (push) Failing after 141h44m18s
- compose.yml: 网络名根据 ENV 变量区分 (xiaoxia-net-staging/xiaoxia-net-production) - infra-production.yml: 使用 xiaoxia-net-production 网络 - infra.yml: 使用 xiaoxia-net-staging 网络 - 新增 nginx-staging.conf (proxy_pass -> xiaoxia-api-staging:8000) - 新增 nginx-production.conf (proxy_pass -> xiaoxia-api-production:8000) - nginx.conf 更新为 production 默认配置 - web-artifact.Dockerfile: 添加 ARG NGINX_CONF 支持构建时选择 nginx 配置 - deploy-staging.sh: 添加 ENV=staging、网络创建、nginx 配置选择 - deploy-production.sh: 添加 ENV=production、网络创建 - deploy.yml: CI 构建传入 NGINX_CONF 参数、远程部署脚本添加网络创建 - deploy.yml: 冒烟测试添加网络隔离验证
59 lines
1.4 KiB
YAML
59 lines
1.4 KiB
YAML
name: xiaoxia-production
|
|
|
|
# ===========================================
|
|
# 日志轮转配置(所有服务共享)
|
|
# ===========================================
|
|
x-logging: &default-logging
|
|
driver: json-file
|
|
options:
|
|
max-size: "50m"
|
|
max-file: "3"
|
|
|
|
services:
|
|
postgres-production:
|
|
image: postgres:16
|
|
container_name: xiaoxia-postgres-production
|
|
restart: always
|
|
environment:
|
|
POSTGRES_DB: ${POSTGRES_DB:-xiaoxia_saas}
|
|
POSTGRES_USER: ${POSTGRES_USER:-xiaoxia}
|
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:?POSTGRES_PASSWORD is required}
|
|
ports:
|
|
- "127.0.0.1:${POSTGRES_PORT:-5433}:5432"
|
|
volumes:
|
|
- postgres_production_data:/var/lib/postgresql/data
|
|
networks:
|
|
- xiaoxia-net
|
|
logging: *default-logging
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-xiaoxia} -d ${POSTGRES_DB:-xiaoxia_saas}"]
|
|
interval: 30s
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
redis-production:
|
|
image: redis:7
|
|
container_name: xiaoxia-redis-production
|
|
restart: always
|
|
ports:
|
|
- "127.0.0.1:${REDIS_PORT:-6380}:6379"
|
|
volumes:
|
|
- redis_production_data:/data
|
|
networks:
|
|
- xiaoxia-net
|
|
logging: *default-logging
|
|
healthcheck:
|
|
test: ["CMD", "redis-cli", "ping"]
|
|
interval: 30s
|
|
timeout: 3s
|
|
retries: 5
|
|
|
|
volumes:
|
|
postgres_production_data:
|
|
redis_production_data:
|
|
|
|
networks:
|
|
xiaoxia-net:
|
|
external: true
|
|
name: xiaoxia-net-production
|