move back docker network creation to start.sh
dockerproxy and unbound rely on it.
This commit is contained in:
@@ -55,7 +55,6 @@ function start(callback) {
|
||||
|
||||
async.series([
|
||||
(next) => { if (existingInfra.version !== infra.version) removeAllContainers(next); else next(); },
|
||||
createDockerNetwork,
|
||||
markApps.bind(null, existingInfra), // mark app state before we start addons. this gives the db import logic a chance to mark an app as errored
|
||||
graphs.startGraphite.bind(null, existingInfra),
|
||||
sftp.startSftp.bind(null, existingInfra),
|
||||
@@ -132,16 +131,6 @@ function removeAllContainers(callback) {
|
||||
], callback);
|
||||
}
|
||||
|
||||
function createDockerNetwork(callback) {
|
||||
debug('createDockerNetwork: creating cloudron network');
|
||||
|
||||
// this gives docker the network range 172.18.0.0-172.18.15.255
|
||||
async.series([
|
||||
shell.exec.bind(null, 'createDockerNetwork', 'docker network rm cloudron || true'), // may not exist on first run
|
||||
shell.exec.bind(null, 'createDockerNetwork', 'docker network create --subnet=172.18.0.0/16 --ip-range=172.18.0.0/20 cloudron || true') // can fail if (user) containers are still attached
|
||||
], callback);
|
||||
}
|
||||
|
||||
function markApps(existingInfra, callback) {
|
||||
if (existingInfra.version === 'none') { // cloudron is being restored from backup
|
||||
debug('markApps: restoring installed apps');
|
||||
|
||||
Reference in New Issue
Block a user