-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose-dev.yml
74 lines (67 loc) · 1.38 KB
/
docker-compose-dev.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
69
70
71
72
73
74
version: '3.7'
services:
mongo:
image: mongo:latest
command: --serviceExecutor adaptive
volumes:
# allows mongo data to persist regardless of container state
- mongo_data:/data/db
restart: always
ports:
- 27017:27017
environment:
MONGO_INITDB_DATABASE: testdatastore
networks:
- webnet
mongo-express:
image: mongo-express
depends_on:
- mongo
restart: always
ports:
- 8081:8081
environment:
ME_CONFIG_MONGODB_ADMINUSERNAME: root
ME_CONFIG_MONGODB_ADMINPASSWORD: example
networks:
- webnet
node:
image: node:8-alpine
user: node
working_dir: /home/node/app
environment:
- NODE_ENV=production
volumes:
- ./:/home/node/app
expose:
- "8081"
- "12700"
command: "npm start"
networks:
- webnet
api:
# image will only be created and run for development use locally
image: test-data-store:dev
depends_on:
- node
- mongo
ports:
- "12700:12700"
deploy:
replicas: 1
restart_policy:
condition: on-failure
resources:
limits:
cpus: "0.1"
memory: 50M
volumes:
# mounted drive allows realtime development to app code base
- ./:/app
networks:
- webnet
command: "npm run server"
networks:
webnet:
volumes:
mongo_data: