|
@@ -77,7 +77,7 @@ class Release extends Command
|
|
|
private $_user_system;
|
|
|
|
|
|
/**
|
|
|
- * @var string $directory Directorio de instalación
|
|
|
+ * @var string $directory Directorio de instalaci�n
|
|
|
*/
|
|
|
private $directory;
|
|
|
|
|
@@ -428,7 +428,9 @@ class Release extends Command
|
|
|
->addEnv_file($host_env_file)
|
|
|
->addEnv_file($module . "." . $host_env_file)
|
|
|
->addEnv_file($module . ".oauth.env")
|
|
|
- ->addVolumes("./$module/", "/opt/" . $module);
|
|
|
+ ->addVolumes("./$module/", "/opt/" . $module)
|
|
|
+ ->addVolumes("./extra/netmiko", "/opt/netmiko")
|
|
|
+ ->addVolumes("./extra/backups-config", "/opt/ftth/web/backups-config");
|
|
|
|
|
|
$this->addBuild($module, $composer);
|
|
|
|
|
@@ -861,7 +863,9 @@ class Release extends Command
|
|
|
->addEnv_file("host.env")
|
|
|
->addEnv_file("ftth.host.env")
|
|
|
->addEnviroment("AMQP_KEY", "ftth")
|
|
|
- ->addVolumes("./ftth/", "/opt/ftth");
|
|
|
+ ->addVolumes("./ftth/", "/opt/ftth")
|
|
|
+ ->addVolumes("./extra/netmiko", "/opt/netmiko")
|
|
|
+ ->addVolumes("./extra/backups-config", "/opt/ftth/web/backups-config");
|
|
|
|
|
|
$composer
|
|
|
->addService("cablemodem_tasklogger_worker")
|
|
@@ -970,6 +974,25 @@ class Release extends Command
|
|
|
;
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * @param FileFormat2 $composer
|
|
|
+ * @param array $config
|
|
|
+ */
|
|
|
+ public function addSwagger(FileFormat2 $composer, $config = array())
|
|
|
+ {
|
|
|
+ $version = "latest";
|
|
|
+ $registry = "";
|
|
|
+ extract($config);
|
|
|
+
|
|
|
+ $composer
|
|
|
+ ->addService("swagger-ui")
|
|
|
+ ->image($registry . "fd3/swagger-ui:" . $version)
|
|
|
+ ->build("./extra/swagger/")
|
|
|
+ ->restart($this->_docker_restart_default)
|
|
|
+ ->addEnviroment("SWAGGER_JSON", "/foo/ftth.json")
|
|
|
+ ->addPorts(8085, 8080);
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
function getDockerComposer($version = "latest", $host_env_file = "host.env", $registry = "docker.infra.flowdat.com/")
|
|
|
{
|
|
@@ -1019,6 +1042,9 @@ class Release extends Command
|
|
|
// Kea
|
|
|
$this->addKea($composer, $base_vars);
|
|
|
|
|
|
+ // Swagger
|
|
|
+ $this->addSwagger($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
|