From 8f61fe2027ade0a9a4f13f923368b720677a8f7f Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Fri, 8 Mar 2019 14:26:10 +0100 Subject: Install script: fix uwsgi and extra settings conf --- install/ishtar-prepare-instance | 2 +- install/local_settings.py.sample | 5 +++++ install/uwsgi.ini.template | 1 + 3 files changed, 7 insertions(+), 1 deletion(-) (limited to 'install') diff --git a/install/ishtar-prepare-instance b/install/ishtar-prepare-instance index 64853932f..e635dffef 100755 --- a/install/ishtar-prepare-instance +++ b/install/ishtar-prepare-instance @@ -277,7 +277,7 @@ EOF "$INSTANCE/local_settings.py" if [ -f $CONFIG_PATH"extra_settings.py" ]; then - cat $CONFIG_PATH"extra_settings.py" >> "$INSTANCE/local_settings.py" + ln -s $CONFIG_PATH"extra_settings.py" >> "$INSTANCE/extra_settings.py" fi ### UWSGI diff --git a/install/local_settings.py.sample b/install/local_settings.py.sample index 93ccdc01a..aecad17a6 100644 --- a/install/local_settings.py.sample +++ b/install/local_settings.py.sample @@ -35,3 +35,8 @@ DATABASES = { 'PASSWORD': '#DB_PASSWORD#', } } + +try: + from extra_settings import * +except ImportError as e: + print('Unable to load extra_settings.py:', e) diff --git a/install/uwsgi.ini.template b/install/uwsgi.ini.template index 51a4c5b7f..915087258 100644 --- a/install/uwsgi.ini.template +++ b/install/uwsgi.ini.template @@ -10,6 +10,7 @@ master = true protocol = uwsgi env = DJANGO_SETTINGS_MODULE=%(projectname).settings pythonpath = %(base) +pythonpath = %(base)/%(projectname) module = %(projectname).wsgi socket = 127.0.0.1:#UWSGI_PORT# logto = /var/log/django/uwsgi-%(projectname).log -- cgit v1.2.3