-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
73 lines (66 loc) · 1.63 KB
/
Copy pathdocker-compose.yml
File metadata and controls
73 lines (66 loc) · 1.63 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# 一键部署编排(§8.2)。
# 启动:docker compose up -d
# 后端依赖 5 个存储/中间件服务,均含健康检查,backend 等其就绪后启动。
services:
backend:
build: ./backend
ports:
- "8000:8000"
env_file:
- ./backend/.env
environment:
- DATABASE_URL=postgresql+asyncpg://user:pass@db:5432/learning_db
- REDIS_URL=redis://redis:6379/0
- MILVUS_HOST=milvus
- NEO4J_URI=bolt://neo4j:7687
- RABBITMQ_URL=amqp://guest:guest@rabbitmq:5672/
depends_on:
db:
condition: service_healthy
redis:
condition: service_started
neo4j:
condition: service_started
restart: unless-stopped
db:
image: postgres:15
environment:
POSTGRES_DB: learning_db
POSTGRES_USER: user
POSTGRES_PASSWORD: pass
volumes:
- postgres_data:/var/lib/postgresql/data
- ./docs/sql/init_schema.sql:/docker-entrypoint-initdb.d/init_schema.sql:ro
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U user -d learning_db"]
interval: 5s
timeout: 5s
retries: 10
redis:
image: redis:7
ports:
- "6379:6379"
milvus:
image: milvusdb/milvus:v2.3.0
command: ["milvus", "run", "standalone"]
ports:
- "19530:19530"
environment:
ETCD_USE_EMBED: "true"
COMMON_STORAGETYPE: local
neo4j:
image: neo4j:5
ports:
- "7474:7474"
- "7687:7687"
environment:
NEO4J_AUTH: neo4j/password
rabbitmq:
image: rabbitmq:3.12-management
ports:
- "5672:5672"
- "15672:15672"
volumes:
postgres_data: