mirror of
https://github.com/Dispatcharr/Dispatcharr.git
synced 2026-01-23 02:35:14 +00:00
Merge branch 'main' of https://github.com/Dispatcharr/Dispatcharr into Proxy-reverted
This commit is contained in:
commit
dc65f8fb96
50 changed files with 848 additions and 462 deletions
|
|
@ -6,6 +6,7 @@ BASE_DIR = Path(__file__).resolve().parent.parent
|
|||
|
||||
SECRET_KEY = 'REPLACE_ME_WITH_A_REAL_SECRET'
|
||||
REDIS_HOST = os.environ.get("REDIS_HOST", "localhost")
|
||||
REDIS_DB = os.environ.get("REDIS_DB", "0")
|
||||
|
||||
DEBUG = True
|
||||
ALLOWED_HOSTS = ["*"]
|
||||
|
|
@ -13,7 +14,7 @@ ALLOWED_HOSTS = ["*"]
|
|||
INSTALLED_APPS = [
|
||||
'apps.api',
|
||||
'apps.accounts',
|
||||
'apps.channels',
|
||||
'apps.channels.apps.ChannelsConfig',
|
||||
'apps.dashboard',
|
||||
'apps.epg',
|
||||
'apps.hdhr',
|
||||
|
|
@ -22,6 +23,8 @@ INSTALLED_APPS = [
|
|||
'apps.proxy.apps.ProxyConfig',
|
||||
'core',
|
||||
'drf_yasg',
|
||||
'daphne',
|
||||
'channels',
|
||||
'django.contrib.admin',
|
||||
'django.contrib.auth',
|
||||
'django.contrib.contenttypes',
|
||||
|
|
@ -70,6 +73,15 @@ TEMPLATES = [
|
|||
WSGI_APPLICATION = 'dispatcharr.wsgi.application'
|
||||
ASGI_APPLICATION = 'dispatcharr.asgi.application'
|
||||
|
||||
CHANNEL_LAYERS = {
|
||||
"default": {
|
||||
"BACKEND": "channels_redis.core.RedisChannelLayer",
|
||||
"CONFIG": {
|
||||
"hosts": [(REDIS_HOST, 6379, REDIS_DB)], # Ensure Redis is running
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
if os.getenv('DB_ENGINE', None) == 'sqlite':
|
||||
DATABASES = {
|
||||
'default': {
|
||||
|
|
@ -119,12 +131,11 @@ USE_I18N = True
|
|||
USE_TZ = True
|
||||
|
||||
STATIC_URL = '/static/'
|
||||
STATIC_ROOT = BASE_DIR / 'staticfiles' # Directory where static files will be collected
|
||||
STATIC_ROOT = BASE_DIR / 'static' # Directory where static files will be collected
|
||||
|
||||
# Adjust STATICFILES_DIRS to include the paths to the directories that contain your static files.
|
||||
STATICFILES_DIRS = [
|
||||
os.path.join(BASE_DIR, 'frontend/build/static'), # React build static files
|
||||
BASE_DIR / 'static', # Django custom static files (if any)
|
||||
]
|
||||
|
||||
|
||||
|
|
@ -142,6 +153,10 @@ SERVER_IP = "127.0.0.1"
|
|||
|
||||
CORS_ALLOW_ALL_ORIGINS = True
|
||||
CORS_ALLOW_CREDENTIALS = True
|
||||
CSRF_TRUSTED_ORIGINS = [
|
||||
'http://*',
|
||||
'https://*'
|
||||
]
|
||||
APPEND_SLASH = True
|
||||
|
||||
REST_FRAMEWORK = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue