forked from Wilcolab/Anythink-Market-fmtx3
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
44 lines (41 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
37
38
39
40
41
42
43
44
version: "3.8"
services:
anythink-backend:
build: ./backend
container_name: anythink-backend
command: sh -c "cd backend && yarn install && /wait-for-it.sh mongodb:27017 -q -t 60 && yarn dev"
environment:
- NODE_ENV=development
- PORT=3000
- MONGODB_URI=mongodb://mongodb:27017
working_dir: /usr/src
volumes:
- ./:/usr/src/
- /usr/src/backend/node_modules
ports:
- "3000:3000"
depends_on:
- "mongodb"
anythink-frontend:
build: ./frontend
container_name: anythink-frontend
command: sh -c "cd frontend && yarn install && yarn start"
environment:
- NODE_ENV=development
- PORT=3001
working_dir: /usr/src
volumes:
- ./:/usr/src/
- /usr/src/frontend/node_modules
ports:
- "3001:3001"
mongodb:
container_name: mongodb
restart: always
image: mongo
logging:
driver: none
volumes:
- ~/mongo/data:/data/db
ports:
- '27017:27017'