-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
79 lines (75 loc) · 1.72 KB
/
docker-compose.dev.yml
File metadata and controls
79 lines (75 loc) · 1.72 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
67
68
69
70
71
72
73
74
75
76
77
78
79
services:
api:
build:
context: .
dockerfile: Dockerfile.dev
container_name: firefly-api-dev
env_file:
- .env.docker.dev
ports:
- "3000:3000"
volumes:
- .:/app
- firefly-api-node-modules:/app/node_modules
- firefly-api-dist:/app/dist
depends_on:
mongo:
condition: service_healthy
redis:
condition: service_healthy
networks:
- firefly-network
restart: unless-stopped
healthcheck:
test: [
"CMD-SHELL",
"node -e \"fetch('http://localhost:3000/health').then(r => process.exit(r.ok ? 0 : 1)).catch(() => process.exit(1))\""
]
interval: 30s
timeout: 5s
retries: 3
start_period: 20s
mongo:
image: mongo:8
container_name: firefly-mongodb-dev
ports:
- "27017:27017"
volumes:
- firefly-mongo-data-dev:/data/db
networks:
- firefly-network
restart: unless-stopped
healthcheck:
test: [
"CMD-SHELL",
"mongosh --quiet --eval \"db.adminCommand('ping').ok\" | grep 1"
]
interval: 10s
timeout: 5s
retries: 5
start_period: 20s
redis:
image: redis:8-alpine
container_name: firefly-redis-dev
ports:
- "6379:6379"
command: ["redis-server", "--appendonly", "yes"]
volumes:
- firefly-redis-data-dev:/data
networks:
- firefly-network
restart: unless-stopped
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
start_period: 10s
networks:
firefly-network:
driver: bridge
volumes:
firefly-api-node-modules:
firefly-api-dist:
firefly-mongo-data-dev:
firefly-redis-data-dev: