forked from ardanlabs/service
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
66 lines (59 loc) · 1.49 KB
/
docker-compose.yaml
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
# https://docs.docker.com/compose/compose-file
# docker-compose up
# docker-compose stop
# docker-compose down
version: '3'
networks:
shared-network:
driver: bridge
services:
# This starts a local mongo DB.
mongo:
container_name: mongo
networks:
- shared-network
image: mongo:3-jessie
ports:
- 27017:27017
command: --bind_ip 0.0.0.0
# This is the core CRUD based service.
sales-api:
container_name: sales-api
networks:
- shared-network
image: sales-api-amd64:1.0
ports:
- 3000:3000 # CRUD API
- 4000:4000 # DEBUG API
# environment:
# - SALES_DB_HOST=docker.for.mac.localhost:27017
# - SALES_DB_HOST=got:[email protected]:39441/gotraining
# - GODEBUG=gctrace=1
# This sidecar publishes metrics to the console by default.
metrics:
container_name: metrics
networks:
- shared-network
image: metrics-amd64:1.0
ports:
- 3001:3001 # EXPVAR API
- 4001:4001 # DEBUG API
# This sidecar publishes tracing to the console by default.
tracer:
container_name: tracer
networks:
- shared-network
image: tracer-amd64:1.0
ports:
- 3002:3002 # TRACER API
- 4002:4002 # DEBUG API
# environment:
# - SALES_ZIPKIN_HOST=http://zipkin:9411/api/v2/spans
# This sidecar allows for the viewing of traces.
zipkin:
container_name: zipkin
networks:
- shared-network
image: openzipkin/zipkin:2.11
ports:
- 9411:9411