-
Notifications
You must be signed in to change notification settings - Fork 481
/
render.yaml
124 lines (120 loc) · 3.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
databases:
- name: {{project_name}}-postgres
databaseName: {{project_name}}
plan: free
user: {{project_name}}
services:
- type: redis
name: {{project_name}}-redis
plan: free
ipAllowList: [] # only allow internal connections
- type: web
name: {{project_name}}
plan: free
runtime: python
buildCommand: "./render_build.sh"
startCommand: "poetry run gunicorn {{project_name}}.wsgi:application --chdir backend --limit-request-line 8188 --log-file -"
envVars:
- key: ENABLE_DJANGO_COLLECTSTATIC
value: 1
- key: AUTO_MIGRATE
value: 1
- key: DATABASE_URL
fromDatabase:
name: {{project_name}}-postgres
property: connectionString
- key: REDIS_URL
fromService:
type: redis
name: {{project_name}}-redis
property: connectionString
- fromGroup: python-services
- fromGroup: integrations-credentials
# As there aren't free plans for Workers in Render, the configuration for
# celery workers/beat will be commented by default
#
# - type: worker
# name: worker-default
# runtime: python
# env: python
# buildCommand: poetry install
# startCommand: "poetry run celery --workdir backend --app={{project_name}} worker --loglevel=info --max-memory-per-child=$WORKER_MAX_MEMORY --concurrency=$WORKER_CONCURRENCY"
# envVars:
# - key: REMAP_SIGTERM
# value: SIGQUIT
# - key: CELERY_BROKER_POOL_LIMIT
# value: 1
# - key: CELERY_BROKER_CONNECTION_TIMEOUT
# value: 30.0
# - key: CELERY_REDIS_MAX_CONNECTIONS
# value: null
# - key: CELERY_TASK_ACKS_ON_FAILURE_OR_TIMEOUT
# value: true
# - key: CELERY_TASK_REJECT_ON_WORKER_LOST
# value: false
# - key: CELERY_WORKER_PREFETCH_MULTIPLIER
# value: 1
# - key: CELERY_WORKER_CONCURRENCY
# value: null
# - key: CELERY_WORKER_MAX_TASKS_PER_CHILD
# value: 1000
# - key: CELERY_WORKER_SEND_TASK_EVENTS
# value: true
# - key: CELERY_EVENT_QUEUE_EXPIRES
# value: 60.0
# - key: CELERY_EVENT_QUEUE_TTL
# value: 5.0
# - key: WORKER_MAX_MEMORY
# sync: false
# - key: WORKER_CONCURRENCY
# sync: false
# - key: DATABASE_URL
# fromDatabase:
# name: {{project_name}}-postgres
# property: connectionString
# - key: REDIS_URL
# fromService:
# type: redis
# name: {{project_name}}-redis
# property: connectionString
# - fromGroup: python-services
# - fromGroup: integrations-credentials
# - type: worker
# name: beat
# runtime: python
# env: python
# buildCommand: poetry install
# startCommand: "poetry run celery --workdir backend --app={{project_name}} beat --loglevel=info"
# envVars:
# - key: REMAP_SIGTERM
# value: SIGQUIT
# - key: DATABASE_URL
# fromDatabase:
# name: {{project_name}}-postgres
# property: connectionString
# - key: REDIS_URL
# fromService:
# type: redis
# name: {{project_name}}-redis
# property: connectionString
# - fromGroup: python-services
# - fromGroup: integrations-credentials
envVarGroups:
- name: python-services
envVars:
- key: PYTHON_VERSION
value: 3.12.0
- key: POETRY_VERSION
value: 1.7.1
- key: SECRET_KEY
generateValue: true
- key: DJANGO_SETTINGS_MODULE
value: {{project_name}}.settings.production
- key: ALLOWED_HOSTS
value: '*'
- name: integrations-credentials
envVars:
- key: SENDGRID_USERNAME
value: apikey
- key: SENDGRID_PASSWORD
value: placeholder-value