mirror of https://github.com/snachodog/mybuddy.git
Create basic render.com configuration
This commit is contained in:
parent
afea4376b9
commit
369c4d9bc6
|
@ -6,4 +6,5 @@
|
|||
!gitpod.py
|
||||
!heroku.py
|
||||
!production.example.py
|
||||
!render.py
|
||||
!test.py
|
||||
|
|
|
@ -0,0 +1,19 @@
|
|||
import dj_database_url
|
||||
|
||||
from .base import *
|
||||
|
||||
RENDER_EXTERNAL_HOSTNAME = os.environ.get('RENDER_EXTERNAL_HOSTNAME')
|
||||
if RENDER_EXTERNAL_HOSTNAME:
|
||||
ALLOWED_HOSTS.append(RENDER_EXTERNAL_HOSTNAME)
|
||||
CSRF_TRUSTED_ORIGINS.append(RENDER_EXTERNAL_HOSTNAME)
|
||||
|
||||
|
||||
# Database
|
||||
# https://docs.djangoproject.com/en/4.0/ref/settings/#databases
|
||||
|
||||
DATABASES = {
|
||||
'default': dj_database_url.config(
|
||||
default='postgresql://postgres:postgres@localhost:5432/babybuddy',
|
||||
conn_max_age=600
|
||||
)
|
||||
}
|
|
@ -0,0 +1,21 @@
|
|||
databases:
|
||||
- name: babybuddy
|
||||
databaseName: babybuddy
|
||||
user: babybuddy
|
||||
|
||||
services:
|
||||
- type: web
|
||||
name: babybuddy
|
||||
env: python
|
||||
startCommand: "gunicorn babybuddy.wsgi:application"
|
||||
envVars:
|
||||
- key: DJANGO_SETTINGS_MODULE
|
||||
value: babybuddy.settings.render
|
||||
- key: DATABASE_URL
|
||||
fromDatabase:
|
||||
name: babybuddy
|
||||
property: connectionString
|
||||
- key: SECRET_KEY
|
||||
generateValue: true
|
||||
- key: WEB_CONCURRENCY
|
||||
value: 4
|
Loading…
Reference in New Issue