Skip to content

Commit

Permalink
revert settings changes
Browse files Browse the repository at this point in the history
  • Loading branch information
petrjasek committed Dec 1, 2023
1 parent d9ca90c commit 8cbdabf
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions server/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,21 @@
# AUTHORS and LICENSE files distributed with this source code, or
# at https://www.sourcefabric.org/superdesk/license

import os
from pathlib import Path


def env(variable, fallback_value=None):
env_value = os.environ.get(variable, '')
if len(env_value) == 0:
return fallback_value
else:
if env_value == "__EMPTY__":
return ''
else:
return env_value


ABS_PATH = str(Path(__file__).resolve().parent)

init_data = Path(ABS_PATH) / 'data'
Expand All @@ -31,6 +43,18 @@
}
}

WS_HOST = env('WSHOST', '0.0.0.0')
WS_PORT = env('WSPORT', '5100')

LOG_CONFIG_FILE = env('LOG_CONFIG_FILE', 'logging_config.yml')

REDIS_URL = env('REDIS_URL', 'redis://localhost:6379')
if env('REDIS_PORT'):
REDIS_URL = env('REDIS_PORT').replace('tcp:', 'redis:')
BROKER_URL = env('CELERY_BROKER_URL', REDIS_URL)

SECRET_KEY = env('SECRET_KEY', '')

NO_TAKES = True

DEFAULT_TIMEZONE = "Europe/Helsinki"
Expand Down

0 comments on commit 8cbdabf

Please sign in to comment.