diff --git a/src/apphealthmonitor.js b/src/apphealthmonitor.js index 5ca0c1d91..4f8fc8989 100644 --- a/src/apphealthmonitor.js +++ b/src/apphealthmonitor.js @@ -71,7 +71,7 @@ async function checkAppHealth(app, options) { const manifest = app.manifest; let healthCheckUrl, host; - if (app.manifest.id === constants.RELAY_APPSTORE_ID) { + if (app.manifest.id === constants.PROXY_APP_APPSTORE_ID) { healthCheckUrl = 'http://example.com'; host = ''; } else { diff --git a/src/apptask.js b/src/apptask.js index 2bf368991..2b8cd4700 100644 --- a/src/apptask.js +++ b/src/apptask.js @@ -74,7 +74,7 @@ async function updateApp(app, values) { async function allocateContainerIp(app) { assert.strictEqual(typeof app, 'object'); - if (app.manifest.id === constants.RELAY_APPSTORE_ID) return; + if (app.manifest.id === constants.PROXY_APP_APPSTORE_ID) return; await promiseRetry({ times: 10, interval: 0, debug }, async function () { const iprange = iputils.intFromIp('172.18.20.255') - iputils.intFromIp('172.18.16.1'); @@ -88,7 +88,7 @@ async function createContainer(app) { assert.strictEqual(typeof app, 'object'); assert(!app.containerId); // otherwise, it will trigger volumeFrom - if (app.manifest.id === constants.RELAY_APPSTORE_ID) return; + if (app.manifest.id === constants.PROXY_APP_APPSTORE_ID) return; debug('createContainer: creating container'); @@ -295,7 +295,7 @@ async function downloadImage(manifest) { assert.strictEqual(typeof manifest, 'object'); // skip for relay app - if (manifest.id === constants.RELAY_APPSTORE_ID) return; + if (manifest.id === constants.PROXY_APP_APPSTORE_ID) return; const info = await docker.info(); const [dfError, diskUsage] = await safe(df.file(info.DockerRootDir)); @@ -312,7 +312,7 @@ async function startApp(app) { if (app.runState === apps.RSTATE_STOPPED) return; // skip for relay app - if (app.manifest.id === constants.RELAY_APPSTORE_ID) return; + if (app.manifest.id === constants.PROXY_APP_APPSTORE_ID) return; await docker.startContainer(app.id); } @@ -685,7 +685,7 @@ async function start(app, args, progressCallback) { await progressCallback({ percent: 10, message: 'Starting app services' }); await services.startAppServices(app); - if (app.manifest.id !== constants.RELAY_APPSTORE_ID) { + if (app.manifest.id !== constants.PROXY_APP_APPSTORE_ID) { await progressCallback({ percent: 35, message: 'Starting container' }); await docker.startContainer(app.id); } @@ -725,7 +725,7 @@ async function restart(app, args, progressCallback) { assert.strictEqual(typeof args, 'object'); assert.strictEqual(typeof progressCallback, 'function'); - if (app.manifest.id !== constants.RELAY_APPSTORE_ID) { + if (app.manifest.id !== constants.PROXY_APP_APPSTORE_ID) { await progressCallback({ percent: 20, message: 'Restarting container' }); await docker.restartContainer(app.id); } diff --git a/src/constants.js b/src/constants.js index 91510fd71..39552d89f 100644 --- a/src/constants.js +++ b/src/constants.js @@ -49,7 +49,7 @@ exports = module.exports = { ], DEMO_APP_LIMIT: 20, - RELAY_APPSTORE_ID: 'io.cloudron.builtin.appproxy', + PROXY_APP_APPSTORE_ID: 'io.cloudron.builtin.appproxy', AUTOUPDATE_PATTERN_NEVER: 'never', diff --git a/src/reverseproxy.js b/src/reverseproxy.js index 9fd57050c..4ecebbc9e 100644 --- a/src/reverseproxy.js +++ b/src/reverseproxy.js @@ -508,7 +508,7 @@ async function writeAppNginxConfig(app, fqdn, type, bundle) { if (type === apps.LOCATION_TYPE_PRIMARY || type === apps.LOCATION_TYPE_ALIAS || type === apps.LOCATION_TYPE_SECONDARY) { data.endpoint = 'app'; - if (app.manifest.id === constants.RELAY_APPSTORE_ID) { + if (app.manifest.id === constants.PROXY_APP_APPSTORE_ID) { data.endpoint = 'external'; data.upstreamUri = app.upstreamUri; }