mirror of https://github.com/snachodog/mybuddy.git
Add settings for Railway
This commit is contained in:
parent
ad1484c2ae
commit
d8e03dbf92
|
@ -6,5 +6,6 @@
|
||||||
!gitpod.py
|
!gitpod.py
|
||||||
!heroku.py
|
!heroku.py
|
||||||
!production.example.py
|
!production.example.py
|
||||||
|
!railway.py
|
||||||
!render.py
|
!render.py
|
||||||
!test.py
|
!test.py
|
||||||
|
|
|
@ -0,0 +1,17 @@
|
||||||
|
import dj_database_url
|
||||||
|
|
||||||
|
from .base import *
|
||||||
|
|
||||||
|
# Settings for Railway.app service.
|
||||||
|
# https://docs.railway.app/develop/variables
|
||||||
|
|
||||||
|
APP_URL = os.environ.get("RAILWAY_STATIC_URL")
|
||||||
|
if APP_URL:
|
||||||
|
ALLOWED_HOSTS.append(APP_URL)
|
||||||
|
CSRF_TRUSTED_ORIGINS.append("".join(["https://", APP_URL]))
|
||||||
|
|
||||||
|
|
||||||
|
# Database
|
||||||
|
# https://docs.djangoproject.com/en/4.0/ref/settings/#databases
|
||||||
|
|
||||||
|
DATABASES = {"default": dj_database_url.config(conn_max_age=500)}
|
Loading…
Reference in New Issue