From d5ffa53e70b9d26b3814ee3b878b0b48998b3dc2 Mon Sep 17 00:00:00 2001 From: Girish Ramakrishnan Date: Tue, 14 Jun 2016 17:44:04 -0700 Subject: [PATCH] create an isolated docker network named cloudron we will move from linked containers to an isolated network. This has the main advantage that linked containers can be upgraded. For example, I can update the mysql container independently without breaking the apps that require it. Apps will only see some minor downtime and will need to reconnect. --- src/platform.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/platform.js b/src/platform.js index d4986ed99..42d77f228 100644 --- a/src/platform.js +++ b/src/platform.js @@ -44,6 +44,7 @@ function initialize(callback) { async.series([ stopContainers, + createDockerNetwork, startAddons, removeOldImages, existingInfra.version === 'none' ? apps.restoreInstalledApps : apps.configureInstalledApps, @@ -73,6 +74,10 @@ function stopContainers(callback) { callback(); } +function createDockerNetwork(callback) { + shell.execSync('createDockerNetwork', 'docker network create --subnet=172.18.0.0/16 cloudron || true', callback); +} + function startGraphite(callback) { const tag = infra.images.graphite.tag; const dataDir = paths.DATA_DIR;