-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yaml
92 lines (83 loc) · 1.9 KB
/
docker-compose.yaml
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
version: "3.1"
volumes:
redis-data:
mongo-data:
rabbitmq_log:
rabbitmq_data:
services:
server:
container_name: api-service
env_file: .env
ports:
- "0.0.0.0:3000:3000"
depends_on:
mongo:
condition: service_started
redis:
condition: service_healthy
restart: true
rabbitmq:
condition: service_healthy
restart: true
# centrifugo:
# condition: service_healthy
# restart: true
build:
context: .
dockerfile: Dockerfile.dev
restart: always
volumes:
- .:/home/nonroot/bundler
redis:
image: redis:6.0
container_name: redis
command: ["redis-server", "--appendonly", "yes"]
ports:
- "0.0.0.0:6379:6379"
volumes:
- redis-data:/data
restart: always
healthcheck:
test: ["CMD", "redis-cli", "--raw", "incr", "ping"]
interval: 5s
timeout: 20s
retries: 5
centrifugo:
container_name: centrifugo
image: centrifugo/centrifugo:v3.2.2
volumes:
- ./centrifugo_config.json:/centrifugo/config.json
command: centrifugo -c config.json
healthcheck:
test: ["CMD", "sh", "-c", "wget -nv -O - http://localhost:8000"]
interval: 3s
timeout: 3s
retries: 3
ulimits:
nofile:
soft: 65535
hard: 65535
ports:
- "0.0.0.0:8000:8000"
mongo:
image: mongo:latest
container_name: mongo
restart: always
ports:
- "0.0.0.0:27017:27017"
volumes:
- mongo-data:/data/db
rabbitmq:
image: heidiks/rabbitmq-delayed-message-exchange:3.8.3-management
container_name: "rabbitmq"
healthcheck:
test: rabbitmq-diagnostics -q ping
interval: 5s
timeout: 20s
retries: 5
ports:
- "0.0.0.0:5672:5672"
- "0.0.0.0:15672:15672"
volumes:
- rabbitmq_log:/var/log/rabbitmq
- rabbitmq_data:/var/lib/rabbitmq