+3
-4
@@ -20,6 +20,7 @@ const apps = require('./apps.js'),
|
||||
services = require('./services.js'),
|
||||
shell = require('./shell.js'),
|
||||
tasks = require('./tasks.js'),
|
||||
volumes = require('./volumes.js'),
|
||||
_ = require('underscore');
|
||||
|
||||
async function start(options) {
|
||||
@@ -47,10 +48,8 @@ async function start(options) {
|
||||
const error = locker.lock(locker.OP_PLATFORM_START);
|
||||
if (error) throw error;
|
||||
|
||||
if (existingInfra.version !== infra.version) {
|
||||
await removeAllContainers();
|
||||
}
|
||||
|
||||
if (existingInfra.version !== infra.version) await removeAllContainers();
|
||||
if (existingInfra.version === 'none') await volumes.mountAll(); // when restoring, mount all volumes
|
||||
await markApps(existingInfra, options); // mark app state before we start addons. this gives the db import logic a chance to mark an app as errored
|
||||
await services.startServices(existingInfra);
|
||||
await fs.promises.writeFile(paths.INFRA_VERSION_FILE, JSON.stringify(infra, null, 4));
|
||||
|
||||
Reference in New Issue
Block a user