fix: infra.yml 端口绑定127.0.0.1、healthcheck间隔优化为30s、添加日志轮转
Deploy / Deploy Staging (push) Failing after 163h32m14s
CI/CD Pipeline / Frontend Lint (push) Failing after 163h32m14s
CI/CD Pipeline / Validate Code Quality And Tests (push) Failing after 163h32m22s
Deploy / Production Browser E2E (push) Failing after 1822h8m18s
Deploy / Deploy Production (push) Failing after 1822h8m20s
Deploy / Build Production Runtime Images (push) Failing after 1822h8m22s

This commit is contained in:
2026-07-02 17:22:12 +08:00
parent 0b63879c11
commit c697ec9944
+15 -4
View File
@@ -1,5 +1,14 @@
version: '3.8'
# ===========================================
# 日志轮转配置(所有服务共享)
# ===========================================
x-logging: &default-logging
driver: json-file
options:
max-size: "50m"
max-file: "3"
services:
postgres:
image: postgres:16
@@ -10,14 +19,15 @@ services:
POSTGRES_USER: xiaoxia
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-changeme_in_production}
ports:
- "5432:5432"
- "127.0.0.1:5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
networks:
- xiaoxia-net
logging: *default-logging
healthcheck:
test: ["CMD-SHELL", "pg_isready -U xiaoxia"]
interval: 10s
interval: 30s
timeout: 5s
retries: 5
@@ -26,14 +36,15 @@ services:
container_name: xiaoxia-redis
restart: always
ports:
- "6379:6379"
- "127.0.0.1:6379:6379"
volumes:
- redis_data:/data
networks:
- xiaoxia-net
logging: *default-logging
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
interval: 30s
timeout: 3s
retries: 5