-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompose-dev.yml
More file actions
79 lines (75 loc) · 1.88 KB
/
compose-dev.yml
File metadata and controls
79 lines (75 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
67
68
69
70
71
72
73
74
75
76
77
78
79
services:
mongodb-dev:
image: mongo:8.0
container_name: surespot-mongodb-dev
restart: unless-stopped
ports:
- '27017:27017'
environment:
MONGO_INITDB_ROOT_USERNAME: surespot
MONGO_INITDB_ROOT_PASSWORD: surespot_dev_password
MONGO_INITDB_DATABASE: surespot
volumes:
- mongodb_dev_data:/data/db
- mongodb_dev_config:/data/configdb
networks:
- surespot-dev-network
healthcheck:
test: echo 'db.runCommand("ping").ok' | mongosh localhost:27017/surespot --quiet
interval: 10s
timeout: 5s
retries: 5
redis-dev:
image: redis:latest
container_name: surespot-redis-dev
restart: unless-stopped
ports:
- '6379:6379'
command: redis-server --appendonly yes --requirepass surespot_redis_password
volumes:
- redis_dev_data:/data
networks:
- surespot-dev-network
healthcheck:
test: ['CMD', 'redis-cli', '-a', 'surespot_redis_password', 'ping']
interval: 10s
timeout: 5s
retries: 5
app:
build:
context: .
dockerfile: Dockerfile
target: development
container_name: surespot-app-dev
restart: unless-stopped
ports:
- '4000:4000'
env_file:
- .env.development
environment:
NODE_ENV: development
PORT: 4000
MONGODB_URI: mongodb://surespot:surespot_dev_password@mongodb-dev:27017/surespot?authSource=admin
REDIS_HOST: redis-dev
REDIS_PORT: 6379
REDIS_PASSWORD: surespot_redis_password
volumes:
- .:/app
- /app/node_modules
depends_on:
mongodb-dev:
condition: service_healthy
redis-dev:
condition: service_healthy
networks:
- surespot-dev-network
volumes:
mongodb_dev_data:
driver: local
mongodb_dev_config:
driver: local
redis_dev_data:
driver: local
networks:
surespot-dev-network:
driver: bridge