This repository has been archived by the owner on Jun 26, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 532
/
render.yaml
227 lines (215 loc) · 5.19 KB
/
render.yaml
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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
databases:
- name: srv.postgres
plan: pro plus
user: apollo
databaseName: apollo
postgresMajorVersion: 14
ipAllowList: []
services:
# Redis (queues)
- type: redis
name: srv.redis.queues
plan: standard plus
maxmemoryPolicy: noeviction
ipAllowList: []
# Redis (locks)
- type: redis
name: srv.redis.locks
plan: pro plus
maxmemoryPolicy: noeviction
ipAllowList: []
# PGBouncer
- type: pserv
name: srv.pgbouncer
env: docker
plan: standard
repo: https://github.com/render-oss/docker-pgbouncer.git
envVars:
- key: ADMIN_USERS
value: postgres,apollo
- key: DATABASE_URL
fromDatabase:
name: srv.postgres
property: connectionString
- key: DEFAULT_POOL_SIZE
value: 178
- key: MAX_CLIENT_CONN
value: 4096
- key: MIN_POOL_SIZE
value: 8
- key: POOL_MODE
value: transaction
- key: RESERVE_POOL_TIMEOUT
value: 1
- key: SERVER_RESET_QUERY
value: DISCARD ALL
# StatsD
- type: pserv
name: srv.statsd
env: docker
plan: standard
repo: https://github.com/andremedeiros/render-datadog.git
envVars:
- key: DD_API_KEY
sync: false
- key: DD_APM_ENABLED
value: false
- key: DD_LOG_LEVEL
value: ERROR
# API
- type: web
name: web.api
env: go
plan: standard
healthCheckPath: /v1/health
envVars:
- fromGroup: env-settings
- key: BUGSNAG_APP_TYPE
value: api
scaling:
minInstances: 2
maxInstances: 4
targetCPUPercent: 60
buildCommand: go install github.com/bugsnag/panic-monitor@latest && go build ./cmd/apollo
startCommand: panic-monitor ./apollo api
# Notifications
- type: worker
name: worker.notifications
env: go
plan: starter
envVars:
- fromGroup: env-settings
- key: BUGSNAG_APP_TYPE
value: worker
- key: BUGSNAG_METADATA_QUEUE
value: notifications
scaling:
minInstances: 2
maxInstances: 8
targetCPUPercent: 80
buildCommand: go install github.com/bugsnag/panic-monitor@latest && go build ./cmd/apollo
startCommand: panic-monitor ./apollo worker --queue notifications --consumers 1024
# Stuck Notifications Checker
- type: worker
name: worker.notifications.stuck
env: go
plan: starter
envVars:
- fromGroup: env-settings
- key: BUGSNAG_APP_TYPE
value: worker
- key: BUGSNAG_METADATA_QUEUE
value: stuck
scaling:
minInstances: 2
maxInstances: 10
targetCPUPercent: 80
buildCommand: go install github.com/bugsnag/panic-monitor@latest && go build ./cmd/apollo
startCommand: panic-monitor ./apollo worker --queue stuck-notifications --consumers 64
# Scheduler
- type: worker
name: app.scheduler
env: go
plan: starter
envVars:
- fromGroup: env-settings
- key: BUGSNAG_APP_TYPE
value: scheduler
buildCommand: go install github.com/bugsnag/panic-monitor@latest && go build ./cmd/apollo
startCommand: panic-monitor ./apollo scheduler
# User Watcher
- type: worker
name: worker.watcher.users
env: go
plan: starter
envVars:
- fromGroup: env-settings
- key: BUGSNAG_APP_TYPE
value: worker
- key: BUGSNAG_METADATA_QUEUE
value: users
buildCommand: go install github.com/bugsnag/panic-monitor@latest && go build ./cmd/apollo
startCommand: panic-monitor ./apollo worker --queue users
# Subreddit Watcher
- type: worker
name: worker.watcher.subreddits
env: go
plan: standard
envVars:
- fromGroup: env-settings
- key: BUGSNAG_APP_TYPE
value: worker
- key: BUGSNAG_METADATA_QUEUE
value: subreddits
scaling:
minInstances: 2
maxInstances: 10
targetCPUPercent: 80
buildCommand: go install github.com/bugsnag/panic-monitor@latest && go build ./cmd/apollo
startCommand: panic-monitor ./apollo worker --queue subreddits
# Trending Posts Watcher
- type: worker
name: worker.watcher.trending
env: go
plan: starter
envVars:
- fromGroup: env-settings
- key: BUGSNAG_APP_TYPE
value: worker
- key: BUGSNAG_METADATA_QUEUE
value: trending
scaling:
minInstances: 2
maxInstances: 10
targetCPUPercent: 80
buildCommand: go install github.com/bugsnag/panic-monitor@latest && go build ./cmd/apollo
startCommand: panic-monitor ./apollo worker --queue trending
# Live Activities
- type: worker
name: worker.live-activities
env: go
plan: starter
envVars:
- fromGroup: env-settings
- key: BUGSNAG_APP_TYPE
value: worker
- key: BUGSNAG_METADATA_QUEUE
value: live-activities
scaling:
minInstances: 1
maxInstances: 10
targetCPUPercent: 80
buildCommand: go install github.com/bugsnag/panic-monitor@latest && go build ./cmd/apollo
startCommand: panic-monitor ./apollo worker --queue live-activities
envVarGroups:
# Environment
- name: env-settings
envVars:
- key: APPLE_KEY_ID
sync: false
- key: APPLE_KEY_PATH
value: /etc/secrets/apple.p8
- key: APPLE_TEAM_ID
sync: false
- key: BUGSNAG_API_KEY
sync: false
- key: DD_API_KEY
sync: false
- key: ENV
sync: false
- key: REDDIT_CLIENT_ID
sync: false
- key: SMTP2GO_API_KEY
sync: false
- key: STATSD_URL
sync: false
- key: DATABASE_CONNECTION_POOL_URL # This is temporary and should be overwritten
sync: false
- key: STATSD_URL
sync: false
- key: REDIS_URL
sync: false
- key: REDIS_QUEUE_URL
sync: false
- key: REDIS_LOCKS_URL
sync: false