-
Notifications
You must be signed in to change notification settings - Fork 0
/
compose.yaml
55 lines (52 loc) · 1.29 KB
/
compose.yaml
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
# Dev environment compose file, configured for hot reloads
services:
mongo:
image: mongo:latest
container_name: mongo-cdj
restart: always
command: --logpath /var/log/mongodb/mongod.log --replSet rs0 --bind_ip_all
ports:
- "27017:27017"
environment:
- MONGO_INITDB_DATABASE=cdj
volumes:
- mongo-data:/data/db
- mongo-log:/var/log/mongodb
logging:
driver: json-file
options:
max-size: "200m"
max-file: "10"
backend:
build:
context: ./backend
container_name: backend-cdj
env_file: ./backend/.env
environment:
- NODE_ENV=dev
- MONGO_URI=mongodb://mongo-cdj:27017
ports:
- 3000:3000
depends_on:
- mongo
volumes:
- ./backend/src:/usr/src/app/src
- ./backend/tests:/usr/src/app/tests
- ./backend/index.js:/usr/src/app/index.js
frontend:
build:
context: ./frontend
container_name: frontend-cdj
env_file: ./frontend/.env
environment:
- NODE_ENV=dev
ports:
- 5173:5173
volumes:
- ./frontend/public:/usr/src/app/public
- ./frontend/src:/usr/src/app/src
- ./frontend/index.html:/usr/src/app/index.html
- ./frontend/vite.config.js:/usr/src/app/vite.config.js
volumes:
mongo-data:
mongo-log: