-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
107 lines (100 loc) · 2.9 KB
/
docker-compose.yml
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
version: "3.9"
services:
replicator:
image: replicator:latest
restart: unless-stopped
init: true
command: ["node", "build/app.js", "start"]
environment:
- LOG_LEVEL
- HUB_HOST
- HUB_SSL
- POSTGRES_URL
- REDIS_URL
- STATSD_HOST
- COLORIZE
- WEB_UI_PORT
- CONCURRENCY
- PARTITIONS
ports:
- "${WEB_UI_PORT}:${WEB_UI_PORT}"
volumes:
- app-node_modules:/home/node/app/node_modules
depends_on:
- postgres
- redis
networks:
- replicator-network
postgres:
image: "postgres:16-alpine"
restart: unless-stopped
ports:
- "6541:5432" # Use a port unlikely to be in use so the example "Just Works"
environment:
- POSTGRES_DB=replicator
- POSTGRES_USER=replicator
- POSTGRES_PASSWORD=password
volumes:
- postgres-data:/var/lib/postgresql/data
healthcheck:
# Need to specify name/user to avoid `FATAL: role "root" does not exist` errors in logs
test:
[
"CMD-SHELL",
"env",
"pg_isready",
"--dbname",
"$$POSTGRES_DB",
"-U",
"$$POSTGRES_USER",
]
interval: 10s
timeout: 10s
retries: 3
networks:
- replicator-network
redis:
image: "redis:7.2-alpine"
restart: unless-stopped
command: --save 1 1 --loglevel warning --maxmemory-policy noeviction
volumes:
- redis-data:/data
ports:
- "16379:6379"
healthcheck:
test: ["CMD-SHELL", "redis-cli", "ping"]
interval: 10s
timeout: 10s
retries: 3
start_period: 5s
networks:
- replicator-network
statsd:
image: graphiteapp/graphite-statsd:1.1.10-5
restart: unless-stopped
ports:
# - '80:80' # Graphite web
# - '2003:2003' # Carbon line receiver
# - '2004:2004' # Carbon pickle receiver
# - '7002:7002' # Carbon cache query
- "18125:8125/udp" # StatsD
- "18126:8126" # StatsD admin
networks:
- replicator-network
grafana:
image: grafana/grafana:10.0.3
restart: unless-stopped
volumes:
- ./grafana/grafana.ini:/etc/grafana/grafana.ini
- ./grafana/data:/var/lib/grafana
ports:
- "9001:3000" # Grafana web
networks:
- replicator-network
volumes:
app-node_modules:
postgres-data:
redis-data:
networks:
replicator-network:
driver: bridge