-
Notifications
You must be signed in to change notification settings - Fork 17
/
docker-compose.yml
46 lines (44 loc) · 1.09 KB
/
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
37
38
39
40
41
42
43
44
45
46
version: '3.8'
services:
mongo:
image: mongo:latest
container_name: ds-mongo
ports:
- '27017:27017'
# volumes:
# - mongo-data:/data/db
environment:
- MONGO_INITDB_ROOT_USERNAME=admin
- MONGO_INITDB_ROOT_PASSWORD=secret
backend:
image: node:latest
container_name: ds-backend
working_dir: /app
# volumes:
# - /data/backend:/app
ports:
- '3000:3000'
environment:
- FRONT_END_DOMAIN=http://localhost:4000
- JWT_SECRET=knowledge.kitchen
- JWT_EXP_DAYS=60
- MONGODB_URI=mongodb://admin:secret@localhost:27017/data-storage-app?authSource=admin
depends_on:
- mongo
command: sh -c "npm install && npm start"
frontend:
image: node:latest
container_name: ds-frontend
working_dir: /app
# volumes:
# - /data/front-end:/app
environment:
- PORT=4000 # the port at which the react app will run
- REACT_APP_BACKEND=http://localhost:3000
ports:
- '4000:4000'
depends_on:
- backend
command: sh -c "npm install && npm start"
# volumes:
# mongo-data: