-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
56 lines (51 loc) · 1.27 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
47
48
49
50
51
52
53
54
55
56
version: '3.8'
networks:
staff-network:
driver: bridge
services:
frontend:
image: node:alpine
build:
context: ./frontend
dockerfile: ./frontend/Dockerfile
volumes:
- .:/usr/src/client
working_dir: /usr/src/client/frontend
ports:
- '3000:3000'
networks:
- staff-network
depends_on:
- api
- api_mongo
entrypoint: [ "/usr/src/client/frontend/wait-for.sh", "api_mongo:27017", "--","/usr/src/client/frontend/start.sh" ]
environment:
- API_ADDR=http://127.0.0.1:3001
api:
image: node:alpine
build:
context: ./backend
dockerfile: ./backend/Dockerfile
volumes:
- .:/usr/src/app
working_dir: /usr/src/app/backend
ports:
- '3001:3001'
networks:
- staff-network
depends_on:
- api_mongo
# command: npm install && migrate-mongo up && node server
entrypoint: [ "/usr/src/app/backend/wait-for.sh", "api_mongo:27017", "--", "/usr/src/app/backend/start_for_docker.sh" ]
environment:
- MONGO_URL=mongodb://api_mongo:27017/staff
api_mongo:
image: mongo:latest
volumes:
- mongodb_volume:/data/db
ports:
- '27017:27017'
networks:
- staff-network
volumes:
mongodb_volume: