-
Notifications
You must be signed in to change notification settings - Fork 12
/
docker-compose-dev.yml
69 lines (64 loc) · 1.42 KB
/
docker-compose-dev.yml
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
version: "3.8"
services:
mongodb:
image: docker.io/bitnami/mongodb:latest
networks:
- database
env_file: ./.env.development
environment:
- "MONGODB_PORT_NUMBER=$DB_PORT"
ports:
- $DB_PORT:$DB_PORT
volumes:
- "./mongodb/dev:/bitnami/mongodb:rw"
node-app-dev:
depends_on:
- mongodb
build:
context: ./backend
dockerfile: Dockerfile.dev
networks:
- database
- proxy
env_file: ./.env.development
ports:
- $NODE_PORT:$NODE_PORT
volumes:
- ./backend/app.js:/backend/app.js:ro
- ./backend/controllers:/backend/controllers:ro
- ./backend/middleware:/backend/middleware:ro
- ./backend/models:/backend/models:ro
- ./backend/routes:/backend/routes:ro
react-app-dev:
depends_on:
- node-app-dev
build:
context: ./frontend
dockerfile: Dockerfile.dev
networks:
- proxy
env_file: ./.env.development
ports:
- $REACT_PORT:$REACT_PORT
volumes:
- "./frontend/public:/frontend/public:ro"
- "./frontend/src:/frontend/src:ro"
nginx:
depends_on:
- react-app-dev
- node-app-dev
- mongodb
build:
context: ./nginx
args:
- NODE_PORT=$NODE_PORT
- REACT_PORT=$REACT_PORT
- SERVER_NAME=$SERVER_NAME
- MODE=$MODE
networks:
- proxy
ports:
- 80:80
networks:
proxy:
database: