store mount id in the database

pull/385/head
Fabian Jakobs 2016-11-24 15:31:51 +00:00
rodzic 0c0fe7154c
commit 00bdd6ff47
1 zmienionych plików z 2 dodań i 5 usunięć

Wyświetl plik

@ -73,9 +73,6 @@ define(function(require, exports, module) {
wsSession.role = db.Project.ROLE_VISITOR;
}
// TODO hotfix until we have a way to know the diff dir of a docker container
return next();
if (wsSession.type != "docker" || project.state != db.Project.STATE_READY)
return next();
@ -87,8 +84,8 @@ define(function(require, exports, module) {
db.Container.load(meta.cid, function(err, container) {
if (err) return next(err);
if (container.state == db.Container.STATE_RUNNING)
wsSession.proxyUrl = "http://" + meta.host + ":9000/" + meta.cid + "/home/ubuntu/workspace";
if (container.state == db.Container.STATE_RUNNING && container.mountId)
wsSession.proxyUrl = "http://" + meta.host + ":9000/" + container.mountId + "/home/ubuntu/workspace";
next();
});