Repository navigation
Expand file tree
/
Copy pathdocker-compose.dev.yaml
More file actions
66 lines (63 loc) · 1.88 KB
/
Copy pathdocker-compose.dev.yaml
File metadata and controls
66 lines (63 loc) · 1.88 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
services:
postgres:
image: postgres:16-alpine
container_name: roster-postgres
restart: unless-stopped
environment:
POSTGRES_USER: roster
POSTGRES_PASSWORD: roster
POSTGRES_DB: roster
# 5442 rather than 5432: this machine already runs several Postgres
# containers for other projects.
ports:
- "5442:5432"
volumes:
- roster-pgdata:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U roster -d roster"]
interval: 5s
timeout: 5s
retries: 10
redis:
image: redis:7-alpine
container_name: roster-redis
restart: unless-stopped
# noeviction and AOF are not tuning. BullMQ and the command lists break if
# Redis drops keys under pressure, and a lease key lost across a restart
# can hand one host link to two workers.
command: >
redis-server
--maxmemory-policy noeviction
--appendonly yes
# 6389 rather than 6379: this machine already runs several Redis
# containers for other projects.
ports:
- "6389:6379"
volumes:
- roster-redisdata:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 5s
retries: 10
centrifugo:
image: centrifugo/centrifugo:v6.9.6
container_name: roster-centrifugo
restart: unless-stopped
command: centrifugo --config /centrifugo/config.json
environment:
CENTRIFUGO_HTTP_API_KEY: ${CENTRIFUGO_API_KEY}
CENTRIFUGO_CLIENT_TOKEN_HMAC_SECRET_KEY: ${CENTRIFUGO_TOKEN_HMAC_SECRET}
# 8010 rather than 8000: 8000 is the port this machine hands out most
# often, so the messaging transport gets one of its own.
ports:
- "8010:8000"
volumes:
- ./docker/centrifugo/config.json:/centrifugo/config.json:ro
ulimits:
nofile:
soft: 65536
hard: 65536
volumes:
roster-pgdata:
roster-redisdata: