1
0
mirror of https://github.com/yldio/copilot.git synced 2024-11-14 07:10:05 +02:00
copilot/triton-compose.yml
2017-09-01 23:19:47 +01:00

115 lines
2.7 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:0.7.2-r0.8
command: >
/usr/local/bin/containerpilot
/bin/consul agent -server
-config-dir=/etc/consul
-log-level=err
-bootstrap-expect 1
-ui-dir /ui
restart: always
mem_limit: 128m
labels:
- triton.cns.services=copilot-consul
ports:
- 8500:8500
#############################################################################
# PROMETHEUS
#
# Prometheus is an open source performance monitoring tool
# it is included here for demo purposes and is not required
#############################################################################
prometheus:
image: autopilotpattern/prometheus:1.7.1-r24
restart: always
mem_limit: 1g
ports:
- 9090:9090
labels:
# This label sets the CNS name, Triton's automatic DNS
# Learn more at https://docs.joyent.com/public-cloud/network/cns
- triton.cns.services=prometheus
# This label selects the proper Joyent resource package
# https://www.joyent.com/blog/optimizing-docker-on-triton#ram-cpu-and-disk-resources-for-your-containers
- com.joyent.package=g4-highcpu-1G
env_file:
- _env
environment:
- CONSUL_AGENT=1
rethinkdb:
image: autopilotpattern/rethinkdb:2.3.5r1
restart: always
mem_limit: 1g
env_file:
- _env
environment:
- CONSUL_AGENT=1
expose:
- 28015
- 29015
#############################################################################
# FRONTEND
#############################################################################
frontend:
image: joyent/copilot-frontend:1.0.0
mem_limit: 512m
labels:
- triton.cns.services=copilot
env_file:
- _env
environment:
- PORT=443
ports:
- "80:80"
- "443:443"
restart: always
#############################################################################
# BACKEND
#############################################################################
api:
image: joyent/copilot-api:1.1.0
mem_limit: 1g
expose:
- 3000
env_file:
- _env
environment:
- PORT=3000
restart: always
# Docker-compose wrapper
# Create _env file from running ./setup.sh
compose-api:
image: joyent/copilot-compose:1.0.0
expose:
- 4242
env_file:
- _env
restart: always
rethinkdb:
image: autopilotpattern/rethinkdb:2.3.5r2
restart: always
mem_limit: 1g
env_file:
- _env
environment:
- CONSUL_AGENT=1
expose:
- 28015
- 29015