mirror of
https://github.com/yldio/copilot.git
synced 2024-12-01 07:30:07 +02:00
8295bd6882
this shall be a progressive process
113 lines
3.6 KiB
YAML
113 lines
3.6 KiB
YAML
#############################################################################
|
|
# 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:
|
|
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:
|
|
- 8500
|
|
dns:
|
|
- 127.0.0.1
|
|
labels:
|
|
- triton.cns.services=consul-$CIRCLE_BRANCH
|
|
- com.docker.swarm.affinities=["container!=~*"]
|
|
#############################################################################
|
|
# CloudAPI GraphQL
|
|
#############################################################################
|
|
cloudapi:
|
|
image: quay.io/yldio/joyent-dashboard-cloudapi-graphql:$CIRCLE_BRANCH
|
|
mem_limit: 128m
|
|
labels:
|
|
- triton.cns.services=cloudapi-$CIRCLE_BRANCH
|
|
- com.docker.swarm.affinities=["container!=~*cloudapi*"]
|
|
env_file: .env
|
|
environment:
|
|
- CONSUL_AGENT=1
|
|
- PORT=3000
|
|
ports:
|
|
- 3000:3000
|
|
#############################################################################
|
|
# Frontend
|
|
#############################################################################
|
|
frontend:
|
|
image: quay.io/yldio/joyent-dashboard-frontend:$CIRCLE_BRANCH
|
|
mem_limit: 512m
|
|
labels:
|
|
- triton.cns.services=frontend-$CIRCLE_BRANCH
|
|
- com.docker.swarm.affinities=["container!=~*frontend*"]
|
|
env_file: .env
|
|
environment:
|
|
- CONSUL_AGENT=1
|
|
- PORT=8000
|
|
ports:
|
|
- 8000:8000
|
|
#############################################################################
|
|
# UI
|
|
#############################################################################
|
|
ui:
|
|
image: quay.io/yldio/joyent-dashboard-ui:$CIRCLE_BRANCH
|
|
mem_limit: 512m
|
|
labels:
|
|
- triton.cns.services=ui-$CIRCLE_BRANCH
|
|
- com.docker.swarm.affinities=["container!=~*ui*"]
|
|
env_file: .env
|
|
environment:
|
|
- CONSUL_AGENT=1
|
|
- PORT=8080
|
|
#############################################################################
|
|
# Nginx as a load-balancing tier and reverse proxy
|
|
#############################################################################
|
|
nginx:
|
|
image: quay.io/yldio/joyent-portal-nginx
|
|
restart: always
|
|
mem_limit: 256m
|
|
ports:
|
|
- 80:80
|
|
- 443:443
|
|
env_file: .env
|
|
environment:
|
|
- CONSUL_AGENT=1
|
|
labels:
|
|
- triton.cns.services=nginx-$CIRCLE_BRANCH
|
|
- com.docker.swarm.affinities=["container!=~*nginx*"]
|
|
#############################################################################
|
|
# 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-$CIRCLE_BRANCH
|
|
- com.docker.swarm.affinities=["container!=~*prometheus*"]
|
|
#############################################################################
|
|
# 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:$CIRCLE_BRANCH
|
|
restart: always
|
|
mem_limit: 128m
|
|
env_file: .env
|
|
ports:
|
|
- 80:80
|
|
labels:
|
|
- triton.cns.services=docs-$CIRCLE_BRANCH
|
|
- com.docker.swarm.affinities=["container!=~*docs*"]
|