port_fixes
This commit is contained in:
parent
2a3c514e4c
commit
5bb0a56053
@ -135,3 +135,6 @@ CRISPY_TEMPLATE_PACK = 'bootstrap4'
|
||||
|
||||
AUTH_USER_MODEL = "MUOR.Profile"
|
||||
|
||||
AVAILABLE_PORTS_RANGE = (6000, 7000)
|
||||
|
||||
|
||||
|
@ -4,6 +4,7 @@ from .DockerManager import DockerManager
|
||||
from .NGINXConfigurator import NGINXConfigurator
|
||||
from .models import Profile, Session
|
||||
from django.contrib.auth.signals import user_logged_in, user_logged_out
|
||||
from django.conf import settings
|
||||
|
||||
|
||||
def get_sessions_data():
|
||||
@ -36,7 +37,8 @@ def profile_start_up(sender, user, request, **kwargs):
|
||||
# Create container
|
||||
docker_manager = DockerManager()
|
||||
|
||||
port = 6969
|
||||
# Port range
|
||||
port = settings.AVAILABLE_PORTS_RANGE[0]
|
||||
container_id = -1
|
||||
while True:
|
||||
try:
|
||||
|
Loading…
Reference in New Issue
Block a user