-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrender.yaml
47 lines (45 loc) · 1.32 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
databases:
- name: tweetscanner
databaseName: tweetscanner
user: tweetscanner
services:
- type: web
name: tweetscanner
region: oregon
env: python
buildCommand: "./build.sh"
startCommand: "gunicorn tweetscanner.wsgi:application --timeout 90"
envVars:
- key: DATABASE_URL
fromDatabase:
name: tweetscanner
property: connectionString
- key: SECRET_KEY
generateValue: true
- key: WEB_CONCURRENCY
value: 4
- key: CELERY_BROKER_URL
fromService:
name: celery-redis
type: redis
property: connectionString
- key: INTERNAL_MODEL_ENDPOINT
value: https://tweetscanner.onrender.com/score-tweets/
- type: worker
name: queue
region: oregon
env: python
buildCommand: "poetry install"
startCommand: "celery --app tweetscanner worker --loglevel info --concurrency 4"
envVars:
- key: CELERY_BROKER_URL
fromService:
name: celery-redis
type: redis
property: connectionString
- type: redis
name: celery-redis
region: oregon
plan: starter # we choose a plan with persistence to ensure tasks are not lost upon restart
maxmemoryPolicy: noeviction # recommended policy for queues
ipAllowList: [] # only allow internal connections