Skip to content
Snippets Groups Projects
Commit eb248fb8 authored by Jörn Künsemöller's avatar Jörn Künsemöller
Browse files

LEI-40: Updated routing config for serving LSMR

parent 4f03818a
No related branches found
No related tags found
1 merge request!90Resolve LEI-40
......@@ -8,7 +8,8 @@ RUN yum -y groupinstall 'Development Tools' && \
yum -y install cmake log4cplus-devel python3 python3-devel python3-pip nodejs npm java && \
npm install -g npx && \
npm install -g n && \
n stable
n stable && \
npm install -g serve
RUN echo "Installing packages for LSMR..." && \
yum -y install https://download.postgresql.org/pub/repos/yum/9.4/redhat/rhel-7-x86_64/pgdg-centos94-9.4-3.noarch.rpm && \
......@@ -60,5 +61,5 @@ ENTRYPOINT /bin/bash -c 'export VARIANT=gnucxx11_opt; \
lsmr_testdatabase & \
sleep 15 && \
lsmr & \
cd /lofar/build/gnucxx11_opt/installed/share/www && \
npm start'
\ No newline at end of file
cd /lofar/build/gnucxx11_opt/SAS/LSMR/frontend/frontend_poc && \
serve -s build -p 3000'
\ No newline at end of file
......@@ -10,6 +10,7 @@ http {
proxy_set_header Connection "upgrade";
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Fprwarded-Proto $scheme;
proxy_set_header X-NginX-Proxy true;
proxy_pass_request_headers on;
proxy_redirect off;
......
......@@ -213,3 +213,8 @@ USE_TZ = False # We don't want timezone support since everything is UTC anyway
# https://docs.djangoproject.com/en/2.0/howto/static-files/
STATIC_URL = '/static/'
# Setup support for proxy headers
USE_X_FORWARDED_HOST = True
SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')
\ No newline at end of file
......@@ -16,6 +16,7 @@ Including another URLconf
from django.contrib import admin
from django.urls import path, re_path
from django.conf.urls import url, include
from django.views.generic.base import TemplateView
from rest_framework import routers, permissions
......@@ -44,11 +45,12 @@ swagger_schema_view = get_schema_view(
)
urlpatterns = [
path('api/admin/', admin.site.urls),
path('api/docs/', include_docs_urls(title='LSMR API')),
url(r'^', include('api.urls')),
path('admin/', admin.site.urls),
path('docs/', include_docs_urls(title='LSMR API')),
re_path(r'^swagger(?P<format>\.json|\.yaml)$', swagger_schema_view.without_ui(cache_timeout=0), name='schema-json'),
path('api/swagger/', swagger_schema_view.with_ui('swagger', cache_timeout=0), name='schema-swagger-ui'),
path('api/redoc/', swagger_schema_view.with_ui('redoc', cache_timeout=0), name='schema-redoc'),
path('swagger/', swagger_schema_view.with_ui('swagger', cache_timeout=0), name='schema-swagger-ui'),
path('redoc/', swagger_schema_view.with_ui('redoc', cache_timeout=0), name='schema-redoc'),
]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment