feat: add HA infrastructure, CI/CD pipeline, and Redis/Celery hardening

- Add docker-compose.ha.yml for PostgreSQL/Redis HA setup with Patroni and Sentinel
- Add docker-compose.prod.yml for production deployment
- Add GitHub Actions CI/CD workflow (build.yml)
- Add install.cmd for Windows one-click setup
- Harden Redis connection with retry logic and health checks
- Add Celery HA config with Redis Sentinel support
- Add HA operations runbook
- Update README with deployment and architecture docs
- Move landing page spec to .claude/specs/design/
- Update memory intelligence PRD
This commit is contained in:
zhangtuo
2026-02-28 14:57:02 +08:00
parent 9cdff18336
commit c82d408ea1
14 changed files with 1301 additions and 24 deletions

View File

@@ -5,11 +5,33 @@ from celery.schedules import crontab
from app.core.config import settings
celery_app = Celery(
"dreamweaver",
broker=settings.celery_broker_url,
backend=settings.celery_result_backend,
)
if settings.redis_sentinel_enabled and settings.redis_sentinel_urls:
sentinel_broker = ";".join(settings.redis_sentinel_urls)
celery_app = Celery(
"dreamweaver",
broker=sentinel_broker,
backend=sentinel_broker,
)
celery_app.conf.broker_transport_options = {
"master_name": settings.redis_sentinel_master_name,
"sentinel_kwargs": {
"password": settings.redis_sentinel_password or None,
"socket_timeout": settings.redis_sentinel_socket_timeout,
},
}
celery_app.conf.result_backend_transport_options = {
"master_name": settings.redis_sentinel_master_name,
"sentinel_kwargs": {
"password": settings.redis_sentinel_password or None,
"socket_timeout": settings.redis_sentinel_socket_timeout,
},
}
else:
celery_app = Celery(
"dreamweaver",
broker=settings.celery_broker_url,
backend=settings.celery_result_backend,
)
celery_app.conf.update(
task_track_started=True,