-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
42 lines (39 loc) · 880 Bytes
/
docker-compose.yml
File metadata and controls
42 lines (39 loc) · 880 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
version: '3.8'
services:
mongodb:
image: mongo:6.0
container_name: cake-suite-mongodb
environment:
MONGO_INITDB_ROOT_USERNAME: admin
MONGO_INITDB_ROOT_PASSWORD: secret
MONGO_INITDB_DATABASE: cake-suite
ports:
- "27017:27017"
volumes:
- mongodb_data:/data/db
healthcheck:
test: echo 'db.runCommand("ping").ok' | mongosh localhost:27017/cake-suite --quiet
interval: 5s
timeout: 5s
retries: 10
networks:
- cake-suite-network
backend:
build:
context: ./backend
dockerfile: Dockerfile
container_name: cake-suite-backend
ports:
- "8080:8080"
env_file:
- backend/.env
depends_on:
mongodb:
condition: service_healthy
networks:
- cake-suite-network
networks:
cake-suite-network:
driver: bridge
volumes:
mongodb_data: