From ddeb4c65e6345bb7b32ab4ae498d436946fe0b65 Mon Sep 17 00:00:00 2001 From: mancini <mancini@astron.nl> Date: Fri, 19 Jul 2019 13:44:47 +0200 Subject: [PATCH] OSB-45: fix deployment small issues --- .../DBInterface/django_postgresql/settings.py | 5 +++- LCU/Maintenance/Docker/NginxProxy/nginx.conf | 29 ++++++++++--------- 2 files changed, 20 insertions(+), 14 deletions(-) diff --git a/LCU/Maintenance/DBInterface/django_postgresql/settings.py b/LCU/Maintenance/DBInterface/django_postgresql/settings.py index 10eb4f69a1a..73648b65c68 100644 --- a/LCU/Maintenance/DBInterface/django_postgresql/settings.py +++ b/LCU/Maintenance/DBInterface/django_postgresql/settings.py @@ -32,7 +32,10 @@ SECRET_KEY = 'x)5=9*2a&)32h-loh@rlt_9eyw%t$-fqao*#1j2gh^7=^bnjyy' # SECURITY WARNING: don't run with debug turned on in production! DEBUG = os.environ.get('MDB_DEBUG', False) -ALLOWED_HOSTS = ['lofarmonitortest.control.lofar', 'localhost', '127.0.0.1'] +ALLOWED_HOSTS = ['lofarmonitortest.control.lofar', + 'lofarmonitor.control.lofar', + 'localhost', + '127.0.0.1'] # Application definition diff --git a/LCU/Maintenance/Docker/NginxProxy/nginx.conf b/LCU/Maintenance/Docker/NginxProxy/nginx.conf index 3bfae41702b..fbcbe19d2a9 100644 --- a/LCU/Maintenance/Docker/NginxProxy/nginx.conf +++ b/LCU/Maintenance/Docker/NginxProxy/nginx.conf @@ -1,14 +1,17 @@ -server { - listen 80; - server_name _; - - location /api { - proxy_pass http://lofar-maintenance-restservice:8000; - proxy_set_header Host $host; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - } - - location / { - root /opt/lofar/share/www/; - } +server{ + listen 80; + server_name _; + location / { + try_files $uri $uri/ /index.html; + root /opt/lofar/share/www; + proxy_cache_revalidate on; + } + location /api { + proxy_read_timeout 6000s; + proxy_pass http://lofar-maintenance-restservice:8000; + proxy_set_header Host $host; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_pass_request_headers on; + client_max_body_size 500M; + } } -- GitLab