joyent-portal/docker-compose.yml

113 lines
3.5 KiB
YAML
Raw Normal View History

2016-10-14 13:57:26 +03:00
#############################################################################
# CONSUL
2017-01-24 18:55:06 +02:00
#
# 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.
2016-10-14 13:57:26 +03:00
#############################################################################
consul:
2017-01-24 18:55:06 +02:00
image: autopilotpattern/consul:latest
command: >
/usr/local/bin/containerpilot
/bin/consul agent -server
-bootstrap-expect 3
-config-dir=/etc/consul
-ui-dir /ui
restart: always
mem_limit: 128m
env_file: .env
ports:
2017-01-24 13:47:51 +02:00
- 8500
2017-01-24 18:55:06 +02:00
dns:
- 127.0.0.1
labels:
- triton.cns.services=consul
- com.docker.swarm.affinities=["container!=~*"]
2016-10-17 18:41:17 +03:00
#############################################################################
# CloudAPI GraphQL
#############################################################################
cloudapi:
image: quay.io/yldio/joyent-dashboard-cloudapi-graphql:latest
mem_limit: 128m
labels:
- triton.cns.services=cloudapi
- com.docker.swarm.affinities=["container!=~*cloudapi*"]
env_file: .env
environment:
- CONSUL_AGENT=1
- PORT=3000
ports:
- 3000:3000
2016-10-20 15:36:24 +03:00
#############################################################################
# Frontend
#############################################################################
2016-10-24 18:31:05 +03:00
frontend:
image: quay.io/yldio/joyent-dashboard-frontend:latest
2017-01-24 13:47:51 +02:00
mem_limit: 512m
labels:
2016-10-24 18:31:05 +03:00
- triton.cns.services=frontend
- com.docker.swarm.affinities=["container!=~*frontend*"]
env_file: .env
environment:
- CONSUL_AGENT=1
- PORT=8000
ports:
- 8000:8000
2016-10-28 18:50:05 +03:00
#############################################################################
# UI
2016-10-28 18:50:05 +03:00
#############################################################################
ui:
image: quay.io/yldio/joyent-dashboard-ui:latest
2017-01-24 13:47:51 +02:00
mem_limit: 512m
2016-10-28 18:50:05 +03:00
labels:
- triton.cns.services=ui
- com.docker.swarm.affinities=["container!=~*ui*"]
2016-10-28 18:50:05 +03:00
env_file: .env
environment:
- CONSUL_AGENT=1
2016-10-28 18:50:05 +03:00
- PORT=8080
#############################################################################
# Nginx as a load-balancing tier and reverse proxy
#############################################################################
nginx:
image: quay.io/yldio/joyent-portal-nginx
restart: always
2017-01-24 13:47:51 +02:00
mem_limit: 256m
2016-10-28 18:50:05 +03:00
ports:
2016-11-03 17:59:49 +02:00
- 80:80
- 443:443
env_file: .env
environment:
- CONSUL_AGENT=1
labels:
- triton.cns.services=nginx
- com.docker.swarm.affinities=["container!=~*nginx*"]
2017-01-24 19:53:59 +02:00
#############################################################################
# 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
mem_limit: 1g
env_file: .env
ports:
- 9090
labels:
- triton.cns.services=prometheus
- com.docker.swarm.affinities=["container!=~*prometheus*"]
2017-01-27 14:49:48 +02:00
#############################################################################
# docs is an open source performance monitoring tool
# it is included here for demo purposes and is not required
#############################################################################
docs:
image: quay.io/yldio/joyent-portal-docs
restart: always
mem_limit: 128m
env_file: .env
ports:
- 80:80
labels:
- triton.cns.services=docs
- com.docker.swarm.affinities=["container!=~*docs*"]