Fixes to service configuration
restart service does not rebuild automatically, we should add a route for that. we need to figure where to scale services etc if we randomly create containers like that.
This commit is contained in:
@@ -6,7 +6,8 @@ exports = module.exports = {
|
||||
configure,
|
||||
getLogs,
|
||||
getLogStream,
|
||||
restart
|
||||
restart,
|
||||
rebuild
|
||||
};
|
||||
|
||||
const assert = require('assert'),
|
||||
@@ -126,3 +127,13 @@ function restart(req, res, next) {
|
||||
next(new HttpSuccess(202, {}));
|
||||
});
|
||||
}
|
||||
|
||||
function rebuild(req, res, next) {
|
||||
assert.strictEqual(typeof req.params.service, 'string');
|
||||
|
||||
services.rebuildService(req.params.service, function (error) {
|
||||
if (error) return next(BoxError.toHttpError(error));
|
||||
|
||||
next(new HttpSuccess(202, {}));
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user