move cloudron network creation to platform code
this gives us more control on re-creating the network with different arguments/options when needed.
This commit is contained in:
@@ -34,6 +34,7 @@ const apps = require('./apps.js'),
|
||||
debug = require('debug')('box:cloudron'),
|
||||
delay = require('delay'),
|
||||
dns = require('./dns.js'),
|
||||
dockerProxy = require('./dockerproxy.js'),
|
||||
domains = require('./domains.js'),
|
||||
eventlog = require('./eventlog.js'),
|
||||
fs = require('fs'),
|
||||
@@ -63,6 +64,7 @@ async function initialize() {
|
||||
|
||||
async function uninitialize() {
|
||||
await cron.stopJobs();
|
||||
await dockerProxy.stop();
|
||||
await platform.stopAllTasks();
|
||||
}
|
||||
|
||||
@@ -76,6 +78,7 @@ async function onActivated(options) {
|
||||
// 2. the restore code path can run without sudo (since mail/ is non-root)
|
||||
await platform.start(options);
|
||||
await cron.startJobs();
|
||||
await dockerProxy.start(); // this relies on the 'cloudron' docker network interface to be available
|
||||
|
||||
// disable responding to api calls via IP to not leak domain info. this is carefully placed as the last item, so it buys
|
||||
// the UI some time to query the dashboard domain in the restore code path
|
||||
|
||||
Reference in New Issue
Block a user