-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
80 lines (75 loc) · 1.95 KB
/
Copy pathdocker-compose.yml
File metadata and controls
80 lines (75 loc) · 1.95 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
74
75
76
77
78
79
80
version: '3.9'
services:
master:
build: .
command: python -m backend.grpc.master_server
environment:
DFS_HEARTBEAT_INTERVAL: 5
DFS_HEARTBEAT_TIMEOUT: 15
DFS_REBALANCE_INTERVAL: 5
DFS_METRICS_PORT: 9000
ports:
- "50050:50050"
- "9000:9000"
gateway:
build: .
command: uvicorn backend.gateway.api:app --host 0.0.0.0 --port 8000
environment:
DFS_MASTER_HOST: master
DFS_MASTER_PORT: 50050
SENDGRID_API_KEY: "${SENDGRID_API_KEY:?set your SendGrid API key}"
SENDGRID_FROM_EMAIL: "ngnindem0@gmail.com"
SMTP_HOST: "${SMTP_HOST:-}"
SMTP_PORT: "${SMTP_PORT:-587}"
SMTP_USER: "${SMTP_USER:-}"
SMTP_PASS: "${SMTP_PASS:-}"
SMTP_FROM_EMAIL: "ngnindem0@gmail.com"
SMTP_STARTTLS: "${SMTP_STARTTLS:-1}"
depends_on:
- master
ports:
- "8000:8000"
storage1:
build: .
command: python -m backend.grpc.storage_server --node-id node1 --data-dir /data/node1 --port 50051 --host 0.0.0.0
environment:
DFS_MASTER_HOST: master
DFS_MASTER_PORT: 50050
NODE_PUBLIC_HOST: storage1
DFS_STORAGE_METRICS_PORT: 9101
depends_on:
- master
ports:
- "50051:50051"
- "9101:9101"
volumes:
- storage1-data:/data/node1
storage2:
build: .
command: python -m backend.grpc.storage_server --node-id node2 --data-dir /data/node2 --port 50052 --host 0.0.0.0
environment:
DFS_MASTER_HOST: master
DFS_MASTER_PORT: 50050
NODE_PUBLIC_HOST: storage2
DFS_STORAGE_METRICS_PORT: 9102
depends_on:
- master
ports:
- "50052:50052"
- "9102:9102"
volumes:
- storage2-data:/data/node2
prometheus:
image: prom/prometheus:latest
volumes:
- ./prometheus.yml:/etc/prometheus/prometheus.yml
ports:
- "9090:9090"
depends_on:
- master
- gateway
- storage1
- storage2
volumes:
storage1-data:
storage2-data: