-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
60 lines (58 loc) · 1.81 KB
/
docker-compose.yml
File metadata and controls
60 lines (58 loc) · 1.81 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
55
56
57
58
59
60
services:
server:
build:
context: ./server
dockerfile: Dockerfile
image: responsive-library-server
container_name: responsive-library-node-server
command: npm run start
volumes:
- ./server/:/usr/src/app
- /usr/src/app/node_modules
ports:
- "127.0.0.1:8080:8080"
# Uncomment the following line and replace the previous line if you want to access the container from outside localhost
# - "8080:8080"
depends_on:
- mongo
env_file: ./server/.env
environment:
- NODE_ENV=development
networks:
- responsive-library-network
mongo:
image: mongo:latest
volumes:
- data-volume:/data/db
ports:
- "127.0.0.1:27017:27017"
# Uncomment the following line and replace the previous line if you want to access the container from outside localhost
# - "27017:27017"
networks:
- responsive-library-network
client:
build:
context: ./client
dockerfile: Dockerfile
image: responsive-library-client
container_name: responsive-library-react-client
command: npm run start
volumes:
- ./client/:/usr/app
- /usr/app/node_modules
depends_on:
- server
ports:
- "127.0.0.1:3000:3000"
# Uncomment the following line and replace the previous line if you want to access the container from outside localhost
# - "3000:3000"
networks:
- responsive-library-network
networks:
responsive-library-network:
driver: bridge
volumes:
data-volume:
node_modules:
web-root:
driver: local