forked from ardanlabs/service
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
55 lines (49 loc) · 1.19 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
# https://docs.docker.com/compose/compose-file
version: '3.8'
networks:
shared-network:
driver: bridge
services:
# This sidecar allows for the viewing of traces.
zipkin:
container_name: zipkin
networks:
- shared-network
image: openzipkin/zipkin:2.11
ports:
- 9411:9411
# This starts a local PostgreSQL DB.
db:
container_name: sales_db
networks:
- shared-network
image: postgres:11.1-alpine
ports:
- 5432:5432
# This is the core CRUD based service.
sales-api:
container_name: sales-api
networks:
- shared-network
image: gcr.io/${PROJECT}/sales-api-amd64:1.0
ports:
- 3000:3000 # CRUD API
- 4000:4000 # DEBUG API
environment:
- SALES_DB_HOST=db
- SALES_DB_DISABLE_TLS=1 # This is only disabled for our development enviroment.
# - GODEBUG=gctrace=1
depends_on:
- zipkin
- db
# This sidecar publishes metrics to the console by default.
metrics:
container_name: metrics
networks:
- shared-network
image: gcr.io/${PROJECT}/metrics-amd64:1.0
ports:
- 3001:3001 # EXPVAR API
- 4001:4001 # DEBUG API
depends_on:
- sales-api