Files
AIclinicalresearch/docker-compose.yml
2025-10-10 15:14:54 +08:00

49 lines
968 B
YAML

version: '3.8'
services:
# PostgreSQL 数据库
postgres:
image: postgres:15-alpine
container_name: ai-clinical-postgres
environment:
POSTGRES_DB: ai_clinical_research
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres123
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
networks:
- ai-clinical-network
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 10s
timeout: 5s
retries: 5
# Redis 缓存
redis:
image: redis:7-alpine
container_name: ai-clinical-redis
ports:
- "6379:6379"
volumes:
- redis_data:/data
networks:
- ai-clinical-network
command: redis-server --appendonly yes
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
volumes:
postgres_data:
redis_data:
networks:
ai-clinical-network:
driver: bridge