Merge remote-tracking branch 'origin/master'
# Conflicts: # MUOR/MUOR/signals.py
This commit is contained in:
commit
948444bdb9
@ -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()
|
||||
|
||||
|
||||
|
@ -1,4 +0,0 @@
|
||||
import docker
|
||||
|
||||
|
||||
client = docker.from_env()
|
Loading…
Reference in New Issue
Block a user