-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
52 lines (48 loc) · 1015 Bytes
/
Copy pathdocker-compose.yml
File metadata and controls
52 lines (48 loc) · 1015 Bytes
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
services:
api:
build:
context: .
dockerfile: Dockerfile
ports:
- "3000:3000"
environment:
NODE_ENV: development
MONGO_URI: mongodb://mongo:27017/url-shortener
REDIS_URL: redis://redis:6379
RABBITMQ_URL: amqp://rabbitmq:5672
depends_on:
mongo:
condition: service_started
redis:
condition: service_started
rabbitmq:
condition: service_healthy
command: npm start
mongo:
image: mongo:latest
ports:
- "27017:27017"
volumes:
- mongo-data:/data/db
redis:
image: redis:latest
ports:
- "6379:6379"
volumes:
- redis-data:/data
rabbitmq:
image: rabbitmq:3-management
ports:
- "5672:5672"
- "15672:15672"
volumes:
- rabbitmq-data:/var/lib/rabbitmq
healthcheck:
test: ["CMD", "rabbitmq-diagnostics", "-q", "ping"]
interval: 30s
timeout: 30s
retries: 3
volumes:
mongo-data:
redis-data:
rabbitmq-data: