2017-05-30 21:04:51 +03:00
|
|
|
#############################################################################
|
|
|
|
# CONSUL
|
|
|
|
#
|
|
|
|
# Consul is the service catalog that helps discovery between the components
|
|
|
|
# Change "-bootstrap" to "-bootstrap-expect 3", then scale to 3 or more to
|
|
|
|
# turn this into an HA Consul raft.
|
|
|
|
#############################################################################
|
|
|
|
consul:
|
2017-06-29 17:29:54 +03:00
|
|
|
image: autopilotpattern/consul:latest
|
2017-05-30 21:04:51 +03:00
|
|
|
command: >
|
|
|
|
/usr/local/bin/containerpilot
|
|
|
|
/bin/consul agent -server
|
2017-06-29 17:29:54 +03:00
|
|
|
-bootstrap-expect 3
|
|
|
|
-config-dir=/etc/consul
|
|
|
|
-ui-dir /ui
|
2017-05-30 21:04:51 +03:00
|
|
|
restart: always
|
|
|
|
mem_limit: 128m
|
|
|
|
ports:
|
|
|
|
- 8500
|
|
|
|
dns:
|
|
|
|
- 127.0.0.1
|
2017-06-29 17:29:54 +03:00
|
|
|
labels:
|
|
|
|
- triton.cns.services=consul-$CIRCLE_BRANCH
|
|
|
|
- com.docker.swarm.affinities=["container!=~*"]
|
2017-05-30 20:52:10 +03:00
|
|
|
|
2017-05-30 21:04:51 +03:00
|
|
|
#############################################################################
|
|
|
|
# PROMETHEUS
|
|
|
|
#
|
|
|
|
# Prometheus is an open source performance monitoring tool
|
|
|
|
# it is included here for demo purposes and is not required
|
|
|
|
#############################################################################
|
|
|
|
prometheus:
|
|
|
|
image: autopilotpattern/prometheus:latest
|
|
|
|
restart: always
|
2017-06-29 17:29:54 +03:00
|
|
|
mem_limit: 1g
|
2017-05-30 21:04:51 +03:00
|
|
|
ports:
|
|
|
|
- 9090
|
2017-06-29 17:29:54 +03:00
|
|
|
labels:
|
|
|
|
- triton.cns.services=prometheus-$CIRCLE_BRANCH
|
|
|
|
- com.docker.swarm.affinities=["container!=~*prometheus*"]
|
|
|
|
|
|
|
|
#############################################################################
|
|
|
|
# STYLEGUIDE
|
|
|
|
#############################################################################
|
|
|
|
styleguide:
|
|
|
|
image: quay.io/yldio/joyent-ui-toolkit:$CIRCLE_BRANCH
|
|
|
|
ports:
|
|
|
|
- 6060
|
|
|
|
mem_limit: 512m
|
|
|
|
labels:
|
|
|
|
- triton.cns.services=styleguide-$CIRCLE_BRANCH
|
|
|
|
- com.docker.swarm.affinities=["container!=~*styleguide*"]
|
2017-05-30 21:04:51 +03:00
|
|
|
environment:
|
|
|
|
- CONSUL_AGENT=1
|
2017-06-29 17:29:54 +03:00
|
|
|
- PORT=6060
|
2017-05-30 20:52:10 +03:00
|
|
|
|
2017-05-30 21:04:51 +03:00
|
|
|
#############################################################################
|
|
|
|
# FRONTEND
|
|
|
|
#############################################################################
|
2017-06-29 17:29:54 +03:00
|
|
|
cp-frontend:
|
|
|
|
image: quay.io/yldio/joyent-cp-frontend:$CIRCLE_BRANCH
|
|
|
|
mem_limit: 512m
|
2017-06-29 01:11:04 +03:00
|
|
|
labels:
|
2017-06-29 17:29:54 +03:00
|
|
|
- triton.cns.services=cp-frontend-$CIRCLE_BRANCH
|
|
|
|
- com.docker.swarm.affinities=["container!=~*cp-frontend*"]
|
|
|
|
environment:
|
|
|
|
- CONSUL_AGENT=1
|
|
|
|
- PORT=3069
|
|
|
|
- REACT_APP_GQL_HOSTNAME=gql-mock-server-$CIRCLE_BRANCH.svc.f4b20699-b323-4452-9091-977895896da6.eu-ams-1.triton.zone
|
|
|
|
- REACT_APP_GQL_PORT=3000
|
2017-05-30 21:04:51 +03:00
|
|
|
ports:
|
2017-06-29 17:29:54 +03:00
|
|
|
- 3069
|
2017-05-30 20:52:10 +03:00
|
|
|
|
2017-05-30 21:04:51 +03:00
|
|
|
#############################################################################
|
|
|
|
# BACKEND
|
|
|
|
#############################################################################
|
2017-06-29 17:29:54 +03:00
|
|
|
gql-mock-server:
|
|
|
|
image: quay.io/yldio/joyent-cp-gql-mock-server:$CIRCLE_BRANCH
|
|
|
|
mem_limit: 512m
|
|
|
|
labels:
|
|
|
|
- triton.cns.services=gql-mock-server-$CIRCLE_BRANCH
|
|
|
|
- com.docker.swarm.affinities=["container!=~*gql-mock-server*"]
|
2017-05-30 21:04:51 +03:00
|
|
|
environment:
|
2017-06-29 17:29:54 +03:00
|
|
|
- CONSUL_AGENT=1
|
|
|
|
- PORT=3000
|
2017-05-30 21:04:51 +03:00
|
|
|
ports:
|
2017-06-29 17:29:54 +03:00
|
|
|
- 3000
|