-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
48 lines (44 loc) · 1011 Bytes
/
docker-compose.yml
File metadata and controls
48 lines (44 loc) · 1011 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
version: "3"
services:
# Main application service (for cloud/Atlas database)
app:
build: .
ports:
- "0.0.0.0:2360:2360"
environment:
# Use environment variable with fallback to local mongo
- MONGODB_URI=${MONGODB_URI:-mongodb://mongo:27017/TypeDash}
volumes:
- ./:/usr/src/app
- /usr/src/app/node_modules
restart: unless-stopped
profiles:
- atlas
# Application with local database dependency
app-local:
build: .
ports:
- "0.0.0.0:2360:2360"
environment:
- MONGODB_URI=${MONGODB_URI:-mongodb://mongo:27017/TypeDash}
depends_on:
- mongo
volumes:
- ./:/usr/src/app
- /usr/src/app/node_modules
restart: unless-stopped
profiles:
- local-db
# Local MongoDB service
mongo:
image: mongo:latest
ports:
- "0.0.0.0:2701:27017"
volumes:
- mongo-data:/data/db
restart: unless-stopped
profiles:
- local-db
volumes:
mongo-data:
driver: local