move dashboard setting into dashboard.js
This commit is contained in:
@@ -38,6 +38,7 @@ const apps = require('./apps.js'),
|
||||
assert = require('assert'),
|
||||
BoxError = require('./boxerror.js'),
|
||||
constants = require('./constants.js'),
|
||||
dashboard = require('./dashboard.js'),
|
||||
debug = require('debug')('box:docker'),
|
||||
Docker = require('dockerode'),
|
||||
paths = require('./paths.js'),
|
||||
@@ -269,13 +270,14 @@ async function createSubcontainer(app, name, cmd, options) {
|
||||
const manifest = app.manifest;
|
||||
const exposedPorts = {}, dockerPortBindings = { };
|
||||
const domain = app.fqdn;
|
||||
const { fqdn:dashboardFqdn } = await dashboard.getLocation();
|
||||
|
||||
const stdEnv = [
|
||||
'CLOUDRON=1',
|
||||
'CLOUDRON_PROXY_IP=172.18.0.1',
|
||||
`CLOUDRON_APP_HOSTNAME=${app.id}`,
|
||||
`CLOUDRON_WEBADMIN_ORIGIN=https://${settings.dashboardFqdn()}`,
|
||||
`CLOUDRON_API_ORIGIN=https://${settings.dashboardFqdn()}`,
|
||||
`CLOUDRON_WEBADMIN_ORIGIN=https://${dashboardFqdn}`,
|
||||
`CLOUDRON_API_ORIGIN=https://${dashboardFqdn}`,
|
||||
`CLOUDRON_APP_ORIGIN=https://${domain}`,
|
||||
`CLOUDRON_APP_DOMAIN=${domain}`
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user