forked from funmusicplace/mirlo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
render.yaml
232 lines (224 loc) · 6.24 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
231
232
services:
# A static site
- type: web
name: client
env: static
buildCommand: corepack enable && yarn install --immutable && yarn client:build && mv client/dist/index.html client/dist/app.html
staticPublishPath: ./client/dist
pullRequestPreviewsEnabled: true # optional
envVars:
- fromGroup: blackbrd
- key: SKIP_INSTALL_DEPS
value: true
routes:
- type: rewrite
source: /*
destination: /index.html
# A node web service
- type: web
name: api
env: node
# env: docker
repo: https://github.com/funmusicplace/mirlo.git # optional
region: oregon # optional (defaults to oregon)
branch: main # optional (defaults to master)
plan: standard # Supposedly this should be free but
# dockerCommand: ./start.sh
# dockerfilePath: ./prod.Dockerfile
buildCommand: corepack enable && yarn install --immutable && yarn prisma:migrate:deploy
startCommand: yarn ts-node src/index.ts
envVars:
- key: SKIP_INSTALL_DEPS
value: true
- key: NODE_ENV
value: production
- key: NODE_OPTIONS
value: --max-old-space-size=1512
- key: DATABASE_URL
fromDatabase:
name: blackbrd
property: connectionString
- fromGroup: blackbrd
- key: REDIS_HOST
fromService:
type: redis
name: redis
property: host
- key: REDIS_PORT
fromService:
type: redis
name: redis
property: port
- key: MINIO_ROOT_PASSWORD
fromService:
type: web
name: minio
envVarKey: MINIO_ROOT_PASSWORD
- key: MINIO_PORT
fromService:
type: web
name: minio
envVarKey: PORT
- key: MINIO_API_PORT
value: 9000
- key: MINIO_HOST
fromService:
type: web
name: minio
property: host
# A private minIO instance
- type: web
name: minio
env: docker
autoDeploy: false
plan: standard
dockerfilePath: "./minio/Dockerfile"
envVars:
- key: MINIO_ROOT_PASSWORD
generateValue: true # will generate a base64-encoded 256-bit secret
- fromGroup: blackbrd
- key: PORT
value: 9000
disk:
name: data
mountPath: /data
sizeGB: 600 # optional
# A worker
- type: worker
name: background
env: docker
plan: standard # optional (defaults to starter)
dockerfilePath: ./Dockerfile # optional
dockerCommand: yarn ts-node src/jobs/queue-worker.ts run
disk: # this disk gets used to process audio. They should get moved to the
# minIO service and deleted after upload
name: data
mountPath: /data
sizeGB: 20 # optional
# dockerContext: ./background/src # optional
envVars:
- key: DATABASE_URL
fromDatabase:
name: blackbrd
property: connectionString
- fromGroup: blackbrd
- key: REDIS_HOST
fromService:
type: redis
name: redis
property: host
- key: REDIS_PORT
fromService:
type: redis
name: redis
property: port
- key: MINIO_ROOT_PASSWORD
fromService:
type: web
name: minio
envVarKey: MINIO_ROOT_PASSWORD
- key: MINIO_PORT
fromService:
type: web
name: minio
envVarKey: PORT
- key: MINIO_HOST
fromService:
type: web
name: minio
property: host
- type: cron
name: every-minute-tasks
env: node
repo: https://github.com/funmusicplace/mirlo.git # optional
plan: starter
startCommand: yarn ts-node src/jobs/every-minute-tasks.ts
buildCommand: corepack enable && yarn install --immutable && yarn prisma:migrate:deploy
schedule: "*/10 * * * *"
envVars:
- key: NODE_OPTIONS
value: --max-old-space-size=512
- key: DATABASE_URL
fromDatabase:
name: blackbrd
property: connectionString
- fromGroup: blackbrd
- key: MINIO_ROOT_PASSWORD
fromService:
type: web
name: minio
envVarKey: MINIO_ROOT_PASSWORD
- key: MINIO_PORT
fromService:
type: web
name: minio
envVarKey: PORT
- key: REDIS_HOST
fromService:
type: redis
name: redis
property: host
- key: REDIS_PORT
fromService:
type: redis
name: redis
property: port
- key: MINIO_API_PORT
value: 9000
- key: MINIO_HOST
fromService:
type: web
name: minio
property: host
branch: main # optional (defaults to master)
- type: cron
name: monthly-tasks
env: node
repo: https://github.com/funmusicplace/mirlo.git # optional
plan: starter
startCommand: yarn ts-node src/jobs/monthly-tasks.ts
buildCommand: corepack enable && yarn install --immutable && yarn prisma:migrate:deploy
schedule: "0 0 1 * *"
envVars:
- key: NODE_OPTIONS
value: --max-old-space-size=512
- key: DATABASE_URL
fromDatabase:
name: blackbrd
property: connectionString
- fromGroup: blackbrd
branch: main # optional (defaults to master)
# A Redis instance
- type: redis
name: redis
ipAllowList: # required
- source: 0.0.0.0/0
description: everywhere
plan: starter # optional (defaults to starter)
maxmemoryPolicy: noeviction # optional (defaults to allkeys-lru)
databases:
- name: blackbrd
plan: standard
# databaseName: postgres # optional (Render may add a suffix)
user: blackbrd # optional
# ipAllowList: # optional (defaults to allow all)
# - source: 203.0.113.4/30
# description: office
# - source: 198.51.100.1
# description: home
# - name: private database
# databaseName: private
# ipAllowList: [] # only allow internal connections
# envVarGroups:
# - name: conc-settings
# envVars:
# - key: CONCURRENCY
# value: 2
# - key: SECRET
# generateValue: true
# - key: USER_PROVIDED_SECRET
# sync: false
# - name: stripe
# envVars:
# - key: STRIPE_API_URL
# value: https://api.stripe.com/v2