forked from ashleydavis/nodejs-microservices-example
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathdocker-compose.yml
67 lines (62 loc) · 1.26 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
version: '3'
services:
db:
image: mongo
container_name: db
ports:
- "4002:27017"
restart: always
db-fixture:
image: db-fixture
build: ./db-fixture
container_name: db-fixture
depends_on:
- db
service:
image: service
build:
context: ./service
dockerfile: Dockerfile-dev
container_name: service
volumes:
- ./tmp/npm:/root/.npm:z
- ./service/src:/usr/src/app/src:z
ports:
- "4001:80"
environment:
- PORT=80
- DBHOST=mongodb://db:27017
- NODE_ENV=development
depends_on:
- db
restart: always
web:
image: web
build:
context: ./web
dockerfile: Dockerfile-dev
container_name: web
volumes:
- ./tmp/npm:/root/.npm:z
- ./web/src:/usr/src/app/src:z
ports:
- "4000:80"
environment:
- PORT=80
- NODE_ENV=development
depends_on:
- service
restart: always
## LOAD GENERATOR
# load-generator:
# image: loadimpact/k6:latest
# container_name: load-generator
# command: run --include-system-env-vars /src/load-test.js
# environment:
# - TARGET_HOST=web
# - TARGET_PORT=80
# - DURATION=30s
# volumes:
# - ./load-generator/src:/src/
# depends_on:
# - web