platform: Only re-create docker network on version change

This commit is contained in:
Girish Ramakrishnan
2022-02-10 09:32:15 -08:00
parent ca83deb761
commit 6aa034ea41

View File

@@ -51,9 +51,11 @@ async function start(options) {
for (let attempt = 0; attempt < 5; attempt++) {
try {
if (existingInfra.version !== infra.version) await removeAllContainers();
if (existingInfra.version !== infra.version) {
await removeAllContainers();
await createDockerNetwork();
}
if (existingInfra.version === 'none') await volumes.mountAll(); // when restoring, mount all volumes
await createDockerNetwork();
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));