kopia lustrzana https://github.com/c9/core
store mount id in the database
rodzic
0c0fe7154c
commit
00bdd6ff47
|
@ -73,9 +73,6 @@ define(function(require, exports, module) {
|
||||||
wsSession.role = db.Project.ROLE_VISITOR;
|
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)
|
if (wsSession.type != "docker" || project.state != db.Project.STATE_READY)
|
||||||
return next();
|
return next();
|
||||||
|
|
||||||
|
@ -87,8 +84,8 @@ define(function(require, exports, module) {
|
||||||
db.Container.load(meta.cid, function(err, container) {
|
db.Container.load(meta.cid, function(err, container) {
|
||||||
if (err) return next(err);
|
if (err) return next(err);
|
||||||
|
|
||||||
if (container.state == db.Container.STATE_RUNNING)
|
if (container.state == db.Container.STATE_RUNNING && container.mountId)
|
||||||
wsSession.proxyUrl = "http://" + meta.host + ":9000/" + meta.cid + "/home/ubuntu/workspace";
|
wsSession.proxyUrl = "http://" + meta.host + ":9000/" + container.mountId + "/home/ubuntu/workspace";
|
||||||
|
|
||||||
next();
|
next();
|
||||||
});
|
});
|
||||||
|
|
Ładowanie…
Reference in New Issue