2019-05-16 10:39:25 -04:00
|
|
|
# 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.
|
2019-05-16 18:05:39 -04:00
|
|
|
web-api:
|
|
|
|
container_name: web-api
|
2019-05-16 10:39:25 -04:00
|
|
|
networks:
|
|
|
|
- shared-network
|
2019-05-16 18:05:39 -04:00
|
|
|
image: gcr.io/web-api/web-api-amd64:1.0
|
2019-05-16 10:39:25 -04:00
|
|
|
ports:
|
|
|
|
- 3000:3000 # CRUD API
|
|
|
|
- 4000:4000 # DEBUG API
|
|
|
|
environment:
|
2019-05-16 18:05:39 -04:00
|
|
|
- WEB_APP_AUTH_KEY_ID=1
|
|
|
|
# - WEB_APP_DB_HOST=got:got2015@ds039441.mongolab.com:39441/gotraining
|
2019-05-16 10:39:25 -04:00
|
|
|
# - GODEBUG=gctrace=1
|
|
|
|
|
|
|
|
# This sidecar publishes metrics to the console by default.
|
|
|
|
metrics:
|
|
|
|
container_name: metrics
|
|
|
|
networks:
|
|
|
|
- shared-network
|
2019-05-16 18:05:39 -04:00
|
|
|
image: gcr.io/web-api/metrics-amd64:1.0
|
2019-05-16 10:39:25 -04:00
|
|
|
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
|
2019-05-16 18:05:39 -04:00
|
|
|
image: gcr.io/web-api/tracer-amd64:1.0
|
2019-05-16 10:39:25 -04:00
|
|
|
ports:
|
|
|
|
- 3002:3002 # TRACER API
|
|
|
|
- 4002:4002 # DEBUG API
|
|
|
|
# environment:
|
2019-05-16 18:05:39 -04:00
|
|
|
# - WEB_APP_ZIPKIN_HOST=http://zipkin:9411/api/v2/spans
|
2019-05-16 10:39:25 -04:00
|
|
|
|
|
|
|
# This sidecar allows for the viewing of traces.
|
|
|
|
zipkin:
|
|
|
|
container_name: zipkin
|
|
|
|
networks:
|
|
|
|
- shared-network
|
|
|
|
image: openzipkin/zipkin:2.11
|
|
|
|
ports:
|
|
|
|
- 9411:9411
|