-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocker-compose.yml
68 lines (63 loc) · 1.61 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
57
58
59
60
61
62
63
64
65
66
67
68
version: "3"
volumes:
node_data: {}
networks:
node-net:
external: false
services:
client:
image: node:12.10.0
container_name: reactjs
expose:
- 3000
environment:
- REACT_APP_API_URL=http://localhost:5000/api
- REACT_APP_SOCKET_URL=http://localhost:5000
networks:
- node-net
restart: on-failure
deploy:
restart_policy:
condition: on-failure
ports:
- 3000:3000
volumes:
- "./client/:/home/app/"
depends_on:
- server
command: sh -c "cd /home/app && npm install --save && npm start"
server:
image: node:12.10.0-alpine
container_name: nodejs
expose:
- 5000
environment:
- DATABASE_URL=mongodb://db:27017/maps
- FOLDER_PATH=files/calculateds
- GOOGLE_MAPS_API_KEY=___YOUTOKEN_____
networks:
- node-net
restart: on-failure
deploy:
restart_policy:
condition: on-failure
ports:
- 5000:5000
volumes:
- "./server/:/home/app/"
depends_on:
- db
links:
- db
command: sh -c "cd /home/app && npm install --save && npm run start"
db:
image: mongo
container_name: mongodb
networks:
- node-net
restart: on-failure
deploy:
restart_policy:
condition: on-failure
ports:
- 27017:27017