-
Notifications
You must be signed in to change notification settings - Fork 95
/
docker-compose.yml
36 lines (36 loc) · 1001 Bytes
/
docker-compose.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
version: "3"
services:
mongo:
image: mongo:latest
ports:
- "20717:20717"
volumes:
- /data/db # Create a volume for the DB.
client:
container_name: client
build:
context: ./client
dockerfile: Dockerfile.dev
ports:
- "3000:3000"
restart: always
env_file:
- client.dev.env
stdin_open: true # Hot reloading create react app: https://github.com/facebook/create-react-app/issues/8688#issuecomment-602110747
volumes:
- ./client:/app #Synchronise docker container with local change
- /app/node_modules #Avoid re-copying local node_modules. Cache in volume.
server:
build:
context: ./server
dockerfile: Dockerfile.dev
depends_on:
- mongo
env_file:
- server.dev.env
ports:
- "8081:8081"
restart: always
volumes:
- ./server:/app #Synchronise docker container with local change
- /app/node_modules #Avoid re-copying local node_modules. Cache in volume.