forked from polarsource/polar
-
Notifications
You must be signed in to change notification settings - Fork 0
/
render.yaml
230 lines (216 loc) · 5.75 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
228
229
230
services:
# FastAPI Backend (image)
- type: web
name: server-image
env: image
image:
url: ghcr.io/polarsource/polar:latest
creds:
fromRegistryCreds:
name: polarsource
preDeployCommand: "poetry run task pre_deploy"
region: ohio
plan: standard
numInstances: 1
healthCheckPath: /readyz
autoDeploy: false # deploys are triggered by github actions
# domains:
# - api.polar.sh
envVars:
# CORS
- key: POLAR_CORS_ORIGINS
value: '["https://dashboard.polar.sh", "https://github.com" , "https://polar.sh", "https://polar-polar-sh.vercel.app"]'
# PostgreSQL
- key: POLAR_POSTGRES_USER
fromDatabase:
name: polar
property: user
- key: POLAR_POSTGRES_PWD
fromDatabase:
name: polar
property: password
- key: POLAR_POSTGRES_DATABASE
fromDatabase:
name: polar
property: database
- key: POLAR_POSTGRES_PORT
fromDatabase:
name: polar
property: port
- key: POLAR_POSTGRES_HOST
fromDatabase:
name: polar
property: host
# Redis
- key: POLAR_REDIS_HOST
fromService:
type: redis
name: polar-tasks
property: host
- key: POLAR_REDIS_PORT
fromService:
type: redis
name: polar-tasks
property: port
- fromGroup: github-production
- fromGroup: server-common
- fromGroup: server-stripe
# Worker
- type: worker
name: worker-default
env: image
image:
url: ghcr.io/polarsource/polar:latest
creds:
fromRegistryCreds:
name: polarsource
dockerCommand: "poetry run arq run_worker.WorkerSettings --custom-log-dict run_worker.silent_logger_config_dict"
region: ohio
plan: standard
numInstances: 1
autoDeploy: false # deploys are triggered by github actions
envVars:
# PostgreSQL
- key: POLAR_POSTGRES_USER
fromDatabase:
name: polar
property: user
- key: POLAR_POSTGRES_PWD
fromDatabase:
name: polar
property: password
- key: POLAR_POSTGRES_DATABASE
fromDatabase:
name: polar
property: database
- key: POLAR_POSTGRES_PORT
fromDatabase:
name: polar
property: port
- key: POLAR_POSTGRES_HOST
fromDatabase:
name: polar
property: host
# Redis
- key: POLAR_REDIS_HOST
fromService:
type: redis
name: polar-tasks
property: host
- key: POLAR_REDIS_PORT
fromService:
type: redis
name: polar-tasks
property: port
- fromGroup: github-production
- fromGroup: server-common
- fromGroup: server-stripe
- type: worker
name: worker-github
env: image
image:
url: ghcr.io/polarsource/polar:latest
creds:
fromRegistryCreds:
name: polarsource
dockerCommand: "poetry run arq run_worker.WorkerSettingsGitHubCrawl --custom-log-dict run_worker.silent_logger_config_dict"
region: ohio
plan: standard
numInstances: 1
autoDeploy: false # deploys are triggered by github actions
envVars:
# PostgreSQL
- key: POLAR_POSTGRES_USER
fromDatabase:
name: polar
property: user
- key: POLAR_POSTGRES_PWD
fromDatabase:
name: polar
property: password
- key: POLAR_POSTGRES_DATABASE
fromDatabase:
name: polar
property: database
- key: POLAR_POSTGRES_PORT
fromDatabase:
name: polar
property: port
- key: POLAR_POSTGRES_HOST
fromDatabase:
name: polar
property: host
# Redis
- key: POLAR_REDIS_HOST
fromService:
type: redis
name: polar-tasks
property: host
- key: POLAR_REDIS_PORT
fromService:
type: redis
name: polar-tasks
property: port
- fromGroup: github-production
- fromGroup: server-common
- fromGroup: server-stripe
- type: redis
name: polar-tasks
ipAllowList: [] # allow only internal connections
plan: standard
maxmemoryPolicy: noeviction # no-eviciton for our queue
databases:
- name: polar
databaseName: polar
user: polar
ipAllowList:
- source: 34.90.244.142/32
description: mason_app_1
- source: 35.204.223.102/32
description: mason_app_2
plan: standard
envVarGroups:
- name: github-production
envVars:
- key: POLAR_GITHUB_APP_IDENTIFIER
sync: false
- key: POLAR_GITHUB_APP_PRIVATE_KEY
sync: false
- key: POLAR_GITHUB_APP_WEBHOOK_SECRET
sync: false
- key: POLAR_GITHUB_CLIENT_ID
sync: false
- key: POLAR_GITHUB_CLIENT_SECRET
sync: false
- name: server-common
envVars:
- key: POLAR_GITHUB_BADGE_EMBED
value: 1
- key: POLAR_ENV
value: production
- key: POLAR_LOG_LEVEL
value: INFO
- key: POLAR_TESTING
value: 0
- key: POLAR_DEBUG
value: 0
- key: POLAR_FRONTEND_BASE_URL
value: "https://polar.sh"
- key: POLAR_SENTRY_DSN
sync: false
- key: POLAR_EMAIL_SENDER
value: "sendgrid"
- key: POLAR_SENDGRID_API_KEY
sync: false
- key: POLAR_BASE_URL
value: "https://api.polar.sh/api/v1"
- key: POLAR_DISCORD_WEBHOOK_URL
sync: false
- key: POLAR_POSTHOG_PROJECT_API_KEY
sync: false
- name: server-stripe
envVars:
- key: POLAR_STRIPE_SECRET_KEY
sync: false
- key: POLAR_STRIPE_WEBHOOK_SECRET
sync: false