joyent-portal/local-compose.yml

107 lines
2.3 KiB
YAML
Raw Normal View History

2017-06-19 17:37:38 +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:
image: autopilotpattern/consul:0.7.2-r0.8
2017-06-19 17:37:38 +03:00
command: >
/usr/local/bin/containerpilot
/bin/consul agent -server
-config-dir=/etc/consul
-log-level=err
-bootstrap-expect 1
-ui-dir /ui
2017-06-19 17:37:38 +03:00
restart: always
mem_limit: 128m
ports:
- 8500:8500
2017-06-19 17:37:38 +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:1.7.1-r24
2017-06-19 17:37:38 +03:00
restart: always
mem_limit: 1g
ports:
- 9090:9090
2017-06-19 17:37:38 +03:00
links:
- consul:consul
environment:
- CONSUL=consul
- CONSUL_AGENT=1
2017-06-19 17:37:38 +03:00
#############################################################################
# FRONTEND
#############################################################################
frontend:
2017-08-03 23:09:12 +03:00
build: docker/frontend
2017-06-19 17:37:38 +03:00
mem_limit: 512m
links:
- consul:consul
2017-08-02 01:38:20 +03:00
env_file:
- _env
2017-06-19 17:37:38 +03:00
environment:
- CONSUL=consul
2017-08-02 01:38:20 +03:00
- PORT=443
ports:
- "80:80"
2017-08-02 01:38:20 +03:00
- "443:443"
2017-06-19 17:37:38 +03:00
#############################################################################
# BACKEND
#############################################################################
api:
2017-06-23 19:24:25 +03:00
build: docker/api
2017-06-19 17:37:38 +03:00
mem_limit: 512m
links:
- consul:consul
env_file:
- _env
2017-06-19 17:37:38 +03:00
environment:
- CONSUL=consul
- PORT=3000
expose:
2017-06-19 17:37:38 +03:00
- 3000
# Docker-compose wrapper
# Create _env file from running ./setup.sh
compose-api:
build: docker/compose-api
links:
- consul:consul
expose:
- 4242
env_file:
- _env
environment:
- CONSUL=consul
restart: always
2017-06-19 17:37:38 +03:00
rethinkdb:
image: autopilotpattern/rethinkdb:2.3.5r1
2017-06-19 17:37:38 +03:00
restart: always
mem_limit: 1g
links:
- consul:consul
env_file:
- _env
environment:
- CONSUL=consul
- CONSUL_AGENT=1
ports:
2017-07-31 23:10:04 +03:00
- 8080:8080
2017-06-19 17:37:38 +03:00
expose:
- 28015
- 29015
dns:
- 127.0.0.1