forked from howdyai/botmetrics
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
118 lines (110 loc) · 3.04 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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
version: '2'
services:
database:
image: convox/postgres
ports:
- "5432:5432"
volumes:
- './data:/var/lib/postgresql/data'
redis:
image: convox/redis
ports:
- "6379:6379"
web:
depends_on:
- database
- redis
build: .
command: bundle exec passenger start --max-pool-size 3 --min-instances 1
labels:
- convox.port.443.protocol=https
ports:
- "80:3000"
- "443:3000"
links:
- database
- redis
#Uncomment if you want to bring up with docker-compose
#volumes:
# - '.:/botmetrics'
environment:
- JSON_WEB_TOKEN_SECRET=change_this
- RELAX_BOTS_KEY=bot_metrics_teams
- RELAX_BOTS_PUBSUB=bot_metrics_pubsub
- RELAX_EVENTS_QUEUE=bot_metrics_mq
- RELAX_MUTEX_KEY=bot_metrics_mutex
- RELAX_SEND_BOT_REPLIES='true'
# Uncomment all instances to use with docker-compose
#- REDIS_URL=redis://redis:6379
#- DATABASE_URL=postgres://postgres:password@database:5432
relax-server:
depends_on:
- redis
build: .
command: bin/relax
links:
- redis
environment:
- JSON_WEB_TOKEN_SECRET=change_this
- RELAX_BOTS_KEY=bot_metrics_teams
- RELAX_BOTS_PUBSUB=bot_metrics_pubsub
- RELAX_EVENTS_QUEUE=bot_metrics_mq
- RELAX_MUTEX_KEY=bot_metrics_mutex
- RELAX_SEND_BOT_REPLIES='true'
#- REDIS_URL=redis://redis:6379
relax-client:
depends_on:
- database
- redis
build: .
command: bundle exec rake relax:listen_for_events
links:
- database
- redis
environment:
- JSON_WEB_TOKEN_SECRET=change_this
- RELAX_BOTS_KEY=bot_metrics_teams
- RELAX_BOTS_PUBSUB=bot_metrics_pubsub
- RELAX_EVENTS_QUEUE=bot_metrics_mq
- RELAX_MUTEX_KEY=bot_metrics_mutex
- RELAX_SEND_BOT_REPLIES='true'
#- REDIS_URL=redis://redis:6379
#- DATABASE_URL=postgres://postgres:password@database:5432
clockwork:
depends_on:
- database
- redis
build: .
command: bundle exec clockwork clockwork.rb
links:
- database
- redis
environment:
- JSON_WEB_TOKEN_SECRET=change_this
- RELAX_BOTS_KEY=bot_metrics_teams
- RELAX_BOTS_PUBSUB=bot_metrics_pubsub
- RELAX_EVENTS_QUEUE=bot_metrics_mq
- RELAX_MUTEX_KEY=bot_metrics_mutex
- RELAX_SEND_BOT_REPLIES='true'
#- REDIS_URL=redis://redis:6379
#- DATABASE_URL=postgres://postgres:password@database:5432
sidekiq:
depends_on:
- database
- redis
- web
- relax-server
build: .
command: bundle exec sidekiq -q default -q mailers -v -C config/sidekiq.yml
environment:
- JSON_WEB_TOKEN_SECRET=change_this
- RELAX_BOTS_KEY=bot_metrics_teams
- RELAX_BOTS_PUBSUB=bot_metrics_pubsub
- RELAX_EVENTS_QUEUE=bot_metrics_mq
- RELAX_MUTEX_KEY=bot_metrics_mutex
- RELAX_SEND_BOT_REPLIES='true'
#- REDIS_URL=redis://redis:6379
#- DATABASE_URL=postgres://postgres:password@database:5432
links:
- database
- redis