Merge remote-tracking branch 'origin/master'

# Conflicts:
#	MUOR/MUOR/signals.py
This commit is contained in:
prance 2022-01-28 00:15:29 +01:00
commit 948444bdb9
2 changed files with 14 additions and 8 deletions

View File

@ -26,14 +26,24 @@ def profile_start_up(sender, user, request, **kwargs):
session = Session()
session.user = user
session.sessionid = request.session.session_key
# TODO metoda wybierania portów
port = 6969
session.port = port
# Create container
docker_manager = DockerManager()
# TODO metoda wybierania portów
port = 6969
container_id = -1
while True:
try:
container_id = docker_manager.turn_on_container(user.volume, port)
break
# TODO dodać konkret bledy
except:
port += 1
session.port = port
session.container_id = container_id
session.save()

View File

@ -1,4 +0,0 @@
import docker
client = docker.from_env()