mirror of
https://github.com/yldio/copilot.git
synced 2024-11-28 14:10:04 +02:00
6cd39b2d8c
with sensors and local-compose
100 lines
2.4 KiB
YAML
100 lines
2.4 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
|
|
ports:
|
|
- 8500:8500
|
|
dns:
|
|
- 127.0.0.1
|
|
|
|
#############################################################################
|
|
# 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-r20
|
|
restart: always
|
|
mem_limit: 1g
|
|
ports:
|
|
- 9090:9090
|
|
links:
|
|
- consul:consul
|
|
environment:
|
|
- CONSUL=consul
|
|
- CONSUL_AGENT=1
|
|
dns:
|
|
- 127.0.0.1
|
|
|
|
traefik:
|
|
image: d0cker/traefik
|
|
ports:
|
|
- "80:80"
|
|
- "8080:8080"
|
|
links:
|
|
- consul:consul
|
|
environment:
|
|
- CONSUL=consul
|
|
restart: always
|
|
|
|
#############################################################################
|
|
# FRONTEND
|
|
#############################################################################
|
|
frontend:
|
|
build: ./
|
|
dockerfile: packages/cp-frontend/Dockerfile
|
|
mem_limit: 512m
|
|
links:
|
|
- consul:consul
|
|
environment:
|
|
- CONSUL=consul
|
|
- PORT=5000
|
|
- REACT_APP_GQL_HOSTNAME=localhost
|
|
- REACT_APP_GQL_PORT=80
|
|
expose:
|
|
- 5000
|
|
|
|
#############################################################################
|
|
# BACKEND
|
|
#############################################################################
|
|
api:
|
|
build: ./
|
|
dockerfile: packages/portal-api/Dockerfile
|
|
mem_limit: 512m
|
|
links:
|
|
- consul:consul
|
|
- rethinkdb:rethinkdb
|
|
environment:
|
|
- CONSUL=consul
|
|
- PORT=3000
|
|
- RETHINK_HOST=rethinkdb
|
|
expose:
|
|
- 3000
|
|
|
|
#############################################################################
|
|
# DATABASE
|
|
#############################################################################
|
|
rethinkdb:
|
|
image: rethinkdb
|
|
restart: always
|
|
mem_limit: 1g
|
|
expose:
|
|
- 8080
|
|
- 28015
|
|
- 29015
|