Commit e147b4c6 authored by Yuri Konotopov's avatar Yuri Konotopov

settings: allow passing DEBUG and NO_SECURE_SETTINGS via environment

parent 81efcce6
......@@ -56,6 +56,7 @@ You can start website with commands:
EGO_NODE_ADDRESS=extensions-web \
EGO_SECRET_KEY=SOME_SECRET_KEY \
EGO_XAPIAN_DB=/extensions-web/data/xapian.db \
EGO_NO_SECURE_SETTINGS=1 \
docker-compose up --build
That's all! Website will be available as http://localhost:8080.
......
......@@ -24,7 +24,9 @@ services:
EGO_ADMINISTRATOR_EMAIL: ykonotopov@gnome.org
EGO_ALLOWED_HOST:
EGO_DATABASE_URL:
EGO_DEBUG:
EGO_EMAIL_URL:
EGO_NO_SECURE_SETTINGS:
EGO_SECRET_KEY:
EGO_XAPIAN_DB:
EGO_MEDIA_ROOT: /extensions-web/www/uploaded-files
......
......@@ -23,7 +23,7 @@ XAPIAN_DB_PATH = os.getenv('EGO_XAPIAN_DB') or os.path.join(BASE_DIR, 'xapian.db
SECRET_KEY = os.getenv('EGO_SECRET_KEY') or ''
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = False
DEBUG = True if os.getenv('EGO_DEBUG') else False
ALLOWED_HOSTS = [os.getenv('EGO_ALLOWED_HOST') or "extensions.gnome.org"]
......@@ -173,7 +173,7 @@ if os.getenv('EGO_EMAIL_URL'):
vars().update(dj_email_url.parse(os.getenv('EGO_EMAIL_URL')))
NO_SECURE_SETTINGS = False
NO_SECURE_SETTINGS = True if os.getenv('EGO_NO_SECURE_SETTINGS') else False
NO_STATICFILES_SETTINGS = False
try:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment