mirror of
https://github.com/fawney19/Aether.git
synced 2026-10-03 16:07:46 +08:00
- sql.rs: UPDATE 时对 concurrent_429_count / rpm_429_count 加 COALESCE(, 0),避免 None 覆写为 NULL - effects.rs: rpm_429_count 始终写入 Some(projection.rpm_429_count),不再过滤零值;新增 unknown-429 场景下零值持久化的单元测试 - adaptive.rs: reset 接口将两个计数字段置为 Some(0) 而非 None,与数据库默认语义对齐;同步修正集成测试断言 - docker-compose.build.yml: 补充 AETHER_GATEWAY_AUTO_PREPARE_DATABASE 默认开启 - README.md: 同步说明 build compose 也已默认开启自动迁移
69 lines
1.8 KiB
YAML
69 lines
1.8 KiB
YAML
# Aether 部署配置 - 本地构建
|
|
# 使用方法:
|
|
# 启动服务: docker compose -f docker-compose.build.yml up -d --build
|
|
# 或使用: ./deploy.sh
|
|
|
|
services:
|
|
postgres:
|
|
image: postgres:15
|
|
container_name: aether-postgres
|
|
environment:
|
|
POSTGRES_DB: aether
|
|
POSTGRES_USER: postgres
|
|
POSTGRES_PASSWORD: ${DB_PASSWORD}
|
|
TZ: Asia/Shanghai
|
|
volumes:
|
|
- postgres_data:/var/lib/postgresql/data
|
|
ports:
|
|
- "${DB_PORT:-5432}:5432"
|
|
healthcheck:
|
|
test: [ "CMD-SHELL", "pg_isready -U postgres" ]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 5
|
|
restart: unless-stopped
|
|
|
|
redis:
|
|
image: redis:7-alpine
|
|
container_name: aether-redis
|
|
command: redis-server --appendonly yes --appendfsync everysec --save 60 1000 --requirepass ${REDIS_PASSWORD}
|
|
volumes:
|
|
- redis_data:/data
|
|
ports:
|
|
- "${REDIS_PORT:-6379}:6379"
|
|
healthcheck:
|
|
test: [ "CMD-SHELL", "redis-cli -a \"${REDIS_PASSWORD}\" ping | grep -q PONG" ]
|
|
interval: 5s
|
|
timeout: 3s
|
|
retries: 5
|
|
restart: unless-stopped
|
|
|
|
app:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile.app.local
|
|
image: aether-app:latest
|
|
container_name: aether-app
|
|
env_file:
|
|
- .env
|
|
environment:
|
|
DATABASE_URL: postgresql://postgres:${DB_PASSWORD}@postgres:5432/aether
|
|
REDIS_URL: redis://:${REDIS_PASSWORD}@redis:6379/0
|
|
TZ: Asia/Shanghai
|
|
APP_PORT: ${APP_PORT:-8084}
|
|
AETHER_GATEWAY_AUTO_PREPARE_DATABASE: ${AETHER_GATEWAY_AUTO_PREPARE_DATABASE:-true}
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
redis:
|
|
condition: service_healthy
|
|
ports:
|
|
- "${APP_PORT:-8084}:${APP_PORT:-8084}"
|
|
volumes:
|
|
- ./logs:/app/logs
|
|
restart: unless-stopped
|
|
|
|
volumes:
|
|
postgres_data:
|
|
redis_data:
|