From 3ee63842d72909719b594fbdf17a21adfb308924 Mon Sep 17 00:00:00 2001 From: jankovicn <nikola.jankovic@eox.at> Date: Tue, 18 Jan 2022 12:15:02 +0100 Subject: [PATCH] added configure --- configure.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/configure.sh b/configure.sh index e769bfb..804efb9 100755 --- a/configure.sh +++ b/configure.sh @@ -3,6 +3,7 @@ echo "Running configure.sh" DEBUG=${DEBUG:="false"} + ENABLE_HTTP_ACCESS=${ENABLE_HTTP_ACCESS:="false"} # Configure instance sed -e "s/'disable_existing_loggers': True,/'disable_existing_loggers': False,/" -i pvs_instance/settings.py HANDLERS="'handlers': {\n @@ -62,6 +63,13 @@ sed -e "s/SECRET_KEY = '.*'/SECRET_KEY = '${DJANGO_SECRET_KEY}'/" -i pvs_instance/settings.py chmod g+w -R . chgrp users -R . + + if [[ "$ENABLE_HTTP_ACCESS" = true ]] ; then + echo "Installing and enabling http_access" + pip install http-access==0.0.1 + echo "INSTALLED_APPS += ('http_access', )" >> pvs_instance/settings.py + echo "urlpatterns.append(re_path(r'^http/', include('http_access.urls')))" >> pvs_instance/urls.py + fi if [[ "$DEBUG" = true ]] ; then echo "DEBUG ON Setting functions" -- GitLab