diff --git a/MUOR/MUOR/DockerManager.py b/MUOR/MUOR/DockerManager.py index bc45f6b0d..02ec139f9 100644 --- a/MUOR/MUOR/DockerManager.py +++ b/MUOR/MUOR/DockerManager.py @@ -1,11 +1,12 @@ import docker import hashlib +from django.conf import settings class DockerManager: def __init__(self): self.client = docker.from_env() - self.image = 'felixlohmeier/openrefine' + self.image = settings.DOCKER_IMAGE def create_new_volume(self, username): # Hashing username to get volume name diff --git a/MUOR/MUOR/configs/uwsgi.ini b/MUOR/MUOR/configs/uwsgi.ini new file mode 100644 index 000000000..451d497e7 --- /dev/null +++ b/MUOR/MUOR/configs/uwsgi.ini @@ -0,0 +1,8 @@ +[uwsgi] +chdir=/home/randomsec/RandomSec/MUOR +module=MUOR.wsgi:application +master=True +pidfile=/home/randomsec/project-master.pid +vacuum=True +max-requests=5000 +daemonize=/home/randomsec/RandomSec/log/logs.log \ No newline at end of file diff --git a/MUOR/MUOR/settings.py b/MUOR/MUOR/settings.py index 422ec30bf..b9669c02f 100644 --- a/MUOR/MUOR/settings.py +++ b/MUOR/MUOR/settings.py @@ -139,6 +139,8 @@ AUTH_USER_MODEL = "MUOR.Profile" AVAILABLE_PORTS_RANGE = (6000, 7000) +DOCKER_IMAGE = 'openrefine:latest' + SESSION_EXPIRE_AT_BROWSER_CLOSE = True SESSION_COOKIE_AGE = 60 * 60 diff --git a/MUOR/MUOR/urls.py b/MUOR/MUOR/urls.py index 66476216a..4a143369b 100644 --- a/MUOR/MUOR/urls.py +++ b/MUOR/MUOR/urls.py @@ -25,9 +25,8 @@ urlpatterns = [ path('admin/', admin.site.urls), path('', include('django.contrib.auth.urls')), path('signup/', SignUpView.as_view(), name='signup'), - path('welcome/', TemplateView.as_view(template_name='home.html'), - name='home'), - path('favicon.ico', RedirectView.as_view( - url=staticfiles_storage.url('images/favicon.ico'))), + path('loader/', TemplateView.as_view(template_name='loader.html'), name='loader'), + path('welcome/', TemplateView.as_view(template_name='home.html'), name='home'), + path('favicon.ico', RedirectView.as_view(url=staticfiles_storage.url('images/favicon.ico'))), path('', views.home, name='home') ] diff --git a/MUOR/MUOR/views.py b/MUOR/MUOR/views.py index 780c959ec..944f84540 100644 --- a/MUOR/MUOR/views.py +++ b/MUOR/MUOR/views.py @@ -1,6 +1,4 @@ -from django.contrib.auth import logout from django.contrib.auth.forms import UserCreationForm -from django.http import JsonResponse from django.shortcuts import redirect from django.urls import reverse_lazy from django.views import generic diff --git a/MUOR/db.sqlite3 b/MUOR/db.sqlite3 index 66b5fe754..b8f09abba 100644 Binary files a/MUOR/db.sqlite3 and b/MUOR/db.sqlite3 differ diff --git a/MUOR/templates/base.html b/MUOR/templates/base.html index bb3b175c6..0837aca71 100644 --- a/MUOR/templates/base.html +++ b/MUOR/templates/base.html @@ -2,8 +2,8 @@ - + {% block title %}MultiUserOpenRefine{% endblock %} @@ -25,5 +25,14 @@ + + + \ No newline at end of file diff --git a/MUOR/templates/loader.html b/MUOR/templates/loader.html new file mode 100644 index 000000000..6702a8658 --- /dev/null +++ b/MUOR/templates/loader.html @@ -0,0 +1,13 @@ + +{% extends 'base.html' %} + +{% block title %}Loader{% endblock %} + +{% block content %} +

Your instance is getting ready. Please wait...

+
+
+ Loading... +
+
+{% endblock %} \ No newline at end of file