docker-compose.dev.yaml 984 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. services:
  2. postgres:
  3. image: postgres:18
  4. container_name: claude-code-hub-db-dev
  5. restart: unless-stopped
  6. ports:
  7. - "5432:5432"
  8. environment:
  9. POSTGRES_USER: postgres
  10. POSTGRES_PASSWORD: postgres
  11. POSTGRES_DB: claude_code_hub
  12. TZ: Asia/Shanghai
  13. PGTZ: Asia/Shanghai
  14. volumes:
  15. # 复用现有 Postgres 数据卷,确保不影响原数据
  16. - db_dev_data:/var/lib/postgresql
  17. healthcheck:
  18. test: ["CMD-SHELL", "pg_isready -U postgres -d claude_code_hub"]
  19. interval: 5s
  20. timeout: 5s
  21. retries: 10
  22. start_period: 10s
  23. redis:
  24. image: redis:7-alpine
  25. container_name: claude-code-hub-redis-dev
  26. restart: unless-stopped
  27. ports:
  28. - "6379:6379"
  29. volumes:
  30. - ./data/redis:/data
  31. command: redis-server --appendonly yes
  32. healthcheck:
  33. test: ["CMD", "redis-cli", "ping"]
  34. interval: 5s
  35. timeout: 3s
  36. retries: 5
  37. start_period: 5s
  38. volumes:
  39. db_dev_data: