diff --git a/src/apps.js b/src/apps.js index d88451283..153425c03 100644 --- a/src/apps.js +++ b/src/apps.js @@ -138,6 +138,10 @@ exports = module.exports = { LOCATION_TYPE_REDIRECT: 'redirect', LOCATION_TYPE_ALIAS: 'alias', + // respositories, match with appstore + REPOSITORY_CORE: 'core', + REPOSITORY_COMMUNITY: 'community', + // exported for testing _validatePortBindings: validatePortBindings, _validateAccessRestriction: validateAccessRestriction, @@ -747,6 +751,11 @@ function postProcess(result) { delete result.errorJson; result.taskId = result.taskId ? String(result.taskId) : null; + + // package repository is currently determined by dockerImage + if (!result.manifest.dockerImage) result.repository = ''; + else if (result.manifest.dockerImage.startsWith('cloudron/')) result.repository = exports.REPOSITORY_CORE; + else result.repository = exports.REPOSITORY_COMMUNITY; } function attachProperties(app, domainObjectMap) {