Expose the host /app/data folder when localstorage and docker addons are used

This commit is contained in:
Johannes Zellner
2018-08-13 19:40:41 +02:00
parent 796ced999f
commit b3aa59de19

View File

@@ -205,6 +205,9 @@ function getEnvironment(app, callback) {
appdb.getAddonConfigByAppId(app.id, function (error, result) {
if (error) return callback(error);
// expose the /app/data location of the host when localstorage and docker addons are used
if (app.manifest.addons['localstorage'] && app.manifest.addons['docker']) result.push({ name: 'DOCKER_DATA_DIR', value: path.join(paths.APPS_DATA_DIR, app.id, 'data') });
return callback(null, result.map(function (e) { return e.name + '=' + e.value; }));
});
}