core/settings.py

19 lines
607 B
Python
Raw Normal View History

2023-12-24 14:25:57 +00:00
import sys
2024-01-25 19:41:27 +00:00
from os import environ
2022-09-02 10:23:33 +00:00
PORT = 8080
2022-09-03 10:50:14 +00:00
DB_URL = (
2024-01-25 19:41:27 +00:00
environ.get('DATABASE_URL', '').replace('postgres://', 'postgresql://')
or environ.get('DB_URL', '').replace('postgres://', 'postgresql://')
or 'postgresql://postgres@localhost:5432/discoursio'
2022-09-03 10:50:14 +00:00
)
2024-01-25 19:41:27 +00:00
REDIS_URL = environ.get('REDIS_URL') or 'redis://127.0.0.1'
API_BASE = environ.get('API_BASE') or ''
AUTH_URL = environ.get('AUTH_URL') or ''
SENTRY_DSN = environ.get('SENTRY_DSN')
DEV_SERVER_PID_FILE_NAME = 'dev-server.pid'
MODE = 'development' if 'dev' in sys.argv else 'production'
2023-12-25 01:45:21 +00:00
2024-01-25 19:41:27 +00:00
AUTH_SECRET = environ.get('AUTH_SECRET') or 'nothing'