|
@@ -84,10 +84,12 @@ class Release extends Command
|
|
|
* @var array Contiene los usuarios que van a poder acceder al sistema.
|
|
|
*/
|
|
|
protected $_user_system;
|
|
|
+
|
|
|
/**
|
|
|
* @var string $directory Directorio de instalacion
|
|
|
*/
|
|
|
protected $directory;
|
|
|
+
|
|
|
/**
|
|
|
* @var boolean $_use_nginx_links Para indicar si se crean los links nginx entre los modulos
|
|
|
*/
|
|
@@ -131,7 +133,6 @@ class Release extends Command
|
|
|
$this->_mysql_link = "mysql:mysql";
|
|
|
$this->_running_env = "running.env";
|
|
|
$this->_host_env = "host.env";
|
|
|
-
|
|
|
$this->_docker_restart_default = "on-failure:10";
|
|
|
$this->_user_system = ['users' =>
|
|
|
[
|
|
@@ -271,7 +272,7 @@ class Release extends Command
|
|
|
$this->_ansible_vars["CMD_USERNAME"] = $this->_user_system['users'][$internal_user_id]['user'];
|
|
|
$this->_ansible_vars["CMD_PASSWORD"] = $this->_user_system['users'][$internal_user_id]['password'];
|
|
|
$this->_ansible_vars["ENV_LIST"] = "prod,dev,test";
|
|
|
- $this->_ansible_vars["API_CIDR"] = "172.20.0.0/24";
|
|
|
+ $this->_ansible_vars["API_CIDR"] = "172.20.0.0/24";
|
|
|
$this->_ansible_vars["MYSQL_ROOT_PASSWORD"] = $this->_mysql_root_pass;
|
|
|
|
|
|
$this->_add_nginx_links = (boolean)$input->getOption('add-nginx-links');
|
|
@@ -354,9 +355,11 @@ class Release extends Command
|
|
|
foreach ($depends as $depend) {
|
|
|
if (in_array($depend, $modules)) {
|
|
|
return true;
|
|
|
- }
|
|
|
}
|
|
|
}
|
|
|
+ return $resp;
|
|
|
+ }
|
|
|
+
|
|
|
return false;
|
|
|
}
|
|
|
|
|
@@ -386,10 +389,14 @@ class Release extends Command
|
|
|
if ($helper->ask($input, $output, $question)) {
|
|
|
$modules [] = $name;
|
|
|
$value['REQUIRED'] = true;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
$modules = implode(",", $modules);
|
|
|
return $modules;
|
|
|
}
|
|
@@ -403,8 +410,10 @@ class Release extends Command
|
|
|
foreach ($this->_modules as $key => $values) {
|
|
|
if ($values['HOST_ENV']) {
|
|
|
$resp ["HOST_" . strtoupper($key)] = $this->getDomain($key);
|
|
|
- }
|
|
|
- }
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
return $resp;
|
|
|
}
|
|
|
|
|
@@ -429,6 +438,7 @@ class Release extends Command
|
|
|
"host_env_file" => $host_env_file,
|
|
|
"registry" => $registry);
|
|
|
|
|
|
+
|
|
|
/**************************************************************************************/
|
|
|
/* Apps / Web UI / PMA */
|
|
|
/**************************************************************************************/
|
|
@@ -441,6 +451,7 @@ class Release extends Command
|
|
|
$object->add($this, $composer, $base_vars);
|
|
|
}
|
|
|
|
|
|
+
|
|
|
$this->_dObj->file("docker-compose.yml")->content($composer->render());
|
|
|
|
|
|
// escribo un archivo inventory.ini por defecto para no tener que lanzar los docker
|
|
@@ -518,7 +529,7 @@ class Release extends Command
|
|
|
foreach ($app['VAR_ENV'] as $key => $value) {
|
|
|
if ($key == 'VIRTUAL_HOST') {
|
|
|
$env .= "VIRTUAL_HOST=" . $this->getDomain($module) . "\n";
|
|
|
- } else if ($key == 'PMA_ABSOLUTE_URI') {
|
|
|
+ } else if($key == 'PMA_ABSOLUTE_URI') {
|
|
|
$env .= "PMA_ABSOLUTE_URI=" . $this->getDomain("pma") . "\n";
|
|
|
} else {
|
|
|
$env .= $key . "=" . $value . "\n";
|