-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
54 lines (49 loc) · 1.08 KB
/
docker-compose.yml
File metadata and controls
54 lines (49 loc) · 1.08 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
version: '3.8'
services:
mongodb:
image: mongo:7.0
container_name: mongodb_container
ports:
- '27018:27017'
volumes:
- mongo_data:/data/db
healthcheck:
test: ["CMD", "mongosh", "--eval", "db.adminCommand('ping')"]
interval: 10s
timeout: 5s
retries: 5
compass:
image: mongo-express:latest
container_name: mongo_express_container
ports:
- '8087:8081'
environment:
ME_CONFIG_MONGODB_SERVER: mongodb
ME_CONFIG_MONGODB_URL: mongodb://mongodb:27017
ME_CONFIG_BASICAUTH: false
depends_on:
mongodb:
condition: service_healthy
restart: always
backend:
build:
context: ./backend
dockerfile: Dockerfile
container_name: backend_container
ports:
- '5059:5059'
environment:
MONGO_URI: mongodb://mongodb:27017/mydb
depends_on:
- mongodb
frontend:
build:
context: ./frontend/jon
dockerfile: Dockerfile
container_name: frontend_container
ports:
- '3001:3000'
depends_on:
- backend
volumes:
mongo_data: