forked from autopilotpattern/touchbase
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
86 lines (78 loc) · 1.96 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
# Start with a single host which will bootstrap the cluster.
# In production we'll want to use an HA cluster.
consul:
image: progrium/consul:latest
restart: always
mem_limit: 128m
ports:
- 8500 # expose only Consul's UI on the public IP
dns:
- 127.0.0.1
labels:
- triton.cns.services=tb-consul
command: -server -bootstrap -ui-dir /ui
# The first instance will automatically bootstrap the Couchbase cluster.
# Scale this tier and each additional instance will automatically
# self-configure as a member of the cluster
couchbase:
image: autopilotpattern/couchbase:enterprise-4.0.0-r3
restart: always
mem_limit: 4096m
ports:
- 8091
- 8092
- 8093
links:
- consul:consul
env_file: _env
environment:
- CONSUL=consul
labels:
- triton.cns.services=tb-couchbase
# the main application
touchbase:
image: autopilotpattern/touchbase
restart: always
mem_limit: 1g
ports:
- 3000
links:
- consul:consul
env_file: _env
labels:
- triton.cns.services=tb-touchbase
command: >
/opt/containerpilot/containerpilot
-config file:///opt/containerpilot/touchbase.json
node /usr/local/lib/node_modules/Couch411/app.js
# Nginx as a load-balancing tier and reverse proxy
nginx:
image: autopilotpattern/touchbase-demo-nginx
restart: always
mem_limit: 512m
ports:
- 80
links:
- consul:consul
env_file: _env
environment:
- CONTAINERPILOT=file:///opt/containerpilot/nginx.json
labels:
- triton.cns.services=tb-nginx
command: >
/opt/containerpilot/containerpilot
nginx -g "daemon off;"
# Prometheus server to gather telemetry
prometheus:
image: autopilotpattern/prometheus
mem_limit: 1g
restart: always
labels:
- triton.cns.services=tb-prometheus
ports:
- 9090
links:
- consul:consul
env_file: _env
environment:
- CONSUL=consul