-
Notifications
You must be signed in to change notification settings - Fork 1
/
config.default.js
55 lines (45 loc) · 2.7 KB
/
config.default.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
/*jshint node: true*/
'use strict';
var config = require('webgme-engine/config/config.default'),
validateConfig = require('webgme-engine/config/validator').validateConfig,
path = require('path');
// The server worker manager only makes sense if plugin execution on the server is allowed.
config.plugin.allowServerExecution = true;
// Swap these two lines when webgme-docker-worker-manager is a node_module.
config.server.workerManager.path = path.join(__dirname, '../dockerworkermanager');
// config.server.workerManager.path = 'webgme-docker-worker-manager';
// These are the default options - this section can be left out..
config.server.workerManager.options = {
//dockerode: null, // https://github.com/apocas/dockerode#getting-started
image: 'webgme-docker-worker', // By default all plugins will from this images
maxRunningContainers: 2,
keepContainersAtFailure: false,
// Specific image to use for plugin. Set to null if plugin shouldn't run within docker container.
pluginToImage: {
// PluginGenerator: null,
// ConfigurationArtifact: 'another-image'
},
// The docker network used. By default containers are running within the bridge network and
// can access the host at that network. Unless webgmeUrl is specified the dockerworkermanager can
// figure out the host IP by querying the network. If using another network than bridge - this
// process only works if the host is accessible from that network. (Consider using webgmeUrl for more
// restricted networks.
network: 'bridge',
// If the webgme server is running on the host - the default fallback of config.server.port will work.
// This can be needed if the webgme server itself is running inside a docker container and its port
// isn't map to the same host port. It typically requires the default bridge network to be used.
webgmeServerPort: null,
// If specified will be used as the full webgme server url from the perspective of a
// running docker worker.
// This is needed when connecting to the webgme server container directly (without going through the host).
// When defined the network and webgmeServerPort options aren't used.
webgmeUrl: null,
// Key-value pair for passing in additional parameters or overwriting the default passed from this module.
// Example: Limit containers memory to 512Mb {HostConfig: {Memory: 536870912}}
// Before modifying this make sure not to overwrite anything that the manager strictly depends on.
// Check the code in dockerworkermanager.js - search for dockerParams.
// https://docs.docker.com/engine/api/v1.37/#operation/ContainerCreate
createParams: null,
};
validateConfig(config);
module.exports = config;