# 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: