Commit 72048fbc authored by José Gato Luis's avatar José Gato Luis

unifying config examples

parent 30743a52
Pipeline #2382 passed with stages
in 1 minute and 54 seconds
/**
Copyright (C) 2017 ATOS
Copyright (C) 2017 ATOS
This file is part of AEON.
This file is part of AEON.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>
Authors: Jose Gato Luis (jose.gato@atos.net)
Javier Garcia Hernandez (javier.garcia@atos.net)
Authors: Jose Gato Luis (jose.gato@atos.net)
Javier Garcia Hernandez (javier.garcia@atos.net)
*/
/*
* New configuration model 0.3.0
* This file will include infrastructure: ips, hosts, ports,etc
*
* This file should not be packed with the source code, intead of
* that, these should be passed during runtime. The docker container will not
* include (or just empy version) it.
*
* Depending on deployment processes the file needs to be provided.
* Recomendation while development provide this file from outside the project,
* maybe with a symbolic link, or similar
*
*/
* New configuration model 0.3.0
* This file will include infrastructure: ips, hosts, ports,etc
*
* This file should not be packed with the source code, intead of
* that, these should be passed during runtime. The docker container will not
* include (or just empy version) it.
*
* Depending on deployment processes the file needs to be provided.
* Recomendation while development provide this file from outside the project,
* maybe with a symbolic link, or similar
*
*/
//var winston = require('winston');
var infrastructure = {};
infrastructure.app = {};
infrastructure.db = {};
infrastructure.connectorBroker = {};
infrastructure.smtp = {};
// Database connection
infrastructure.db.host = "127.0.0.1";
infrastructure.db.port = 27017;
// Mesesaging broker connection
infrastructure.connectorBroker.url = "127.0.0.1:5672"
infrastructure.app = {}
// configuration for the external/proxy host
infrastructure.app.SSL = true;
infrastructure.app.protocol = 'https';
infrastructure.app.extHost = '127.0.0.1';
infrastructure.app.extPort = 3000;
// configuration for the internal deployed instance
infrastructure.app.host = '127.0.0.1';
infrastructure.app.port = 3000;
// configuration for the socketIO server
infrastructure.app.socket_server_host = '127.0.0.1';
infrastructure.app.socket_server_port = 7789;
//configuration about the gui interface
infrastructure.app.protocolGUI = infrastructure.app.protocol;
infrastructure.app.extHostGUI = '127.0.0.1';
infrastructure.app.extPortGUI = 8000;
//keycloak infrastructure info
infrastructure.SSO_KEYCLOAK_ENABLED=true,
......@@ -82,4 +61,62 @@ infrastructure.keycloak.dashboard.public_client= true;
infrastructure.keycloak.dashboard.resource= "aeon-dashboard2";
infrastructure.app.logLevel = 'debug'; // { silly: 0, debug: 1, verbose: 2, info: 3, warn: 4, error: 5 }
infrastructure.app.logOptions = { level: config.app.logLevel, colorize: true };
infrastructure.app.logTransport = 'Console';
// Database connection
infrastructure.db.host = "127.0.0.1";
infrastructure.db.port = 27017;
// Mesesaging broker connection
infrastructure.connectorBroker.url = "localhost:5672"
// SMTP server
infrastructure.smtp.url = "smtp://localhost:25/?pool=true";
// configuration for the external/proxy host and ports
// using different ports, the requests will be forwarded
// to the proper individual service instance
infrastructure.app.extProtocol = 'https' ;
infrastructure.app.extHost = '127.0.0.1';
// proxy access port for any service
infrastructure.app.extPort = 3000; //the port for AEON API instances
infrastructure.app.extPortEventsManager= 7789;
infrastructure.app.extPortGUI = 8000;
// SSL configuration for the internal services.
// beware, this is independent of extProtocol
// that referes to how the external proxy is accessed
// the external proxy could be https (ssl)
// but the internal instances could be un-protected
// all the internal service will share the same protocol
// so, if the API internal instance use https,
// the dashboard and events manager will also do the same.
// extProtocol is only used to compose external url for making
// request and no for raising services
infrastructure.app.protocol = 'https';
// configuration for the internal deployed instances of API
infrastructure.app.host = '127.0.0.1';
infrastructure.app.port = 3000;
// internal hosts shoulde used only when raising up the server
// to attach this address (usually 0.0.0.0 or localhost or similar)
// to reach the service by a request the proxy:port should be the way
// configuration for the internal deployed instances of Events Manager
infrastructure.app.hostEventsManager = '127.0.0.1';
infrastructure.app.portEventsManager = 7789;
// configuration for the internal deployed instances of Dashboard
infrastructure.app.hostGUI = '127.0.0.1';
infrastructure.app.portGUI = 8000;
module.exports.infrastructure = infrastructure;
......@@ -55,15 +55,9 @@ secrets.app = {};
secrets.app.key = 'cert/key.pem'; //only if ssl enabled
secrets.app.cert = 'cert/cert.pem'; //only if ssl enabled
// live demo
secrets.app.live_demo_puburl = '';
secrets.app.live_demo_suburl = '';
// this secret is used to encrypt passwords in the database
secrets.app.secret = "default should be changed";
//keycloak api configuration
secrets.keycloak={};
secrets.keycloak.api={};
......@@ -74,4 +68,9 @@ secrets.keycloak.api.resource= "aeon-api";
secrets.keycloak.api.client_secret="";
// live demo
secrets.app.live_demo_puburl = '';
secrets.app.live_demo_suburl = '';
module.exports.secrets = secrets;
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment