-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
executable file
·51 lines (48 loc) · 1.04 KB
/
Copy pathdocker-compose.yml
File metadata and controls
executable file
·51 lines (48 loc) · 1.04 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
services:
app:
build: .
container_name: order_planning_ecommerce
ports:
- "4001:4000"
environment:
- DB_HOSTED_URI=mongodb://mongo:27017/e-commerce
- PORT=4000
- JWT_SECRET=development-secret
- JWT_EXPIRE=5d
- REDIS_URL=redis://redis:6379
depends_on:
mongo:
condition: service_healthy
restart: unless-stopped
mongo:
image: mongo:7.0
container_name: my_mongodb
ports:
- "27017:27017"
volumes:
- mongo-data:/data/db
healthcheck:
test: ["CMD", "mongosh", "--eval", "db.adminCommand('ping')"]
interval: 10s
timeout: 10s
retries: 5
start_period: 40s
restart: unless-stopped
redis:
image: redis:alpine
container_name: my_redis
ports:
- "6379:6379"
volumes:
- redis-data:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
restart: unless-stopped
volumes:
mongo-data:
driver: local
redis-data:
driver: local