|
@@ -169,7 +169,7 @@ inventory=inventory.ini
|
|
|
|
|
|
}
|
|
|
|
|
|
- function addBase($composer, $config = array(), $flavor = "dev"){
|
|
|
+ function addBase($composer, $config = array(), $flavor = "dev"){
|
|
|
$version = "latest";
|
|
|
$fd_domain = "fd3.flowdat.com";
|
|
|
extract($config);
|
|
@@ -190,7 +190,7 @@ inventory=inventory.ini
|
|
|
;
|
|
|
}
|
|
|
|
|
|
- function addFtth($composer, $config = array(), $flavor = "dev"){
|
|
|
+ function addFtth($composer, $config = array(), $flavor = "dev"){
|
|
|
$version = "latest";
|
|
|
$fd_domain = "fd3.flowdat.com";
|
|
|
extract($config);
|
|
@@ -221,7 +221,7 @@ inventory=inventory.ini
|
|
|
|
|
|
}
|
|
|
|
|
|
- function addCablemodem($composer, $config = array(), $flavor = "dev"){
|
|
|
+ function addCablemodem($composer, $config = array(), $flavor = "dev"){
|
|
|
$version = "latest";
|
|
|
$fd_domain = "fd3.flowdat.com";
|
|
|
extract($config);
|
|
@@ -251,7 +251,7 @@ inventory=inventory.ini
|
|
|
;
|
|
|
}
|
|
|
|
|
|
- function addRadius($composer, $config = array(), $flavor = "dev"){
|
|
|
+ function addRadius($composer, $config = array(), $flavor = "dev"){
|
|
|
$version = "latest";
|
|
|
$fd_domain = "fd3.flowdat.com";
|
|
|
extract($config);
|
|
@@ -282,7 +282,7 @@ inventory=inventory.ini
|
|
|
|
|
|
}
|
|
|
|
|
|
- function addStats($composer, $config = array(), $flavor = "dev"){
|
|
|
+ function addStats($composer, $config = array(), $flavor = "dev"){
|
|
|
$version = "latest";
|
|
|
$fd_domain = "fd3.flowdat.com";
|
|
|
extract($config);
|
|
@@ -315,7 +315,7 @@ inventory=inventory.ini
|
|
|
|
|
|
}
|
|
|
|
|
|
- function addMapas($composer, $config = array(), $flavor = "dev"){
|
|
|
+ function addMapas($composer, $config = array(), $flavor = "dev"){
|
|
|
$version = "latest";
|
|
|
$fd_domain = "fd3.flowdat.com";
|
|
|
extract($config);
|
|
@@ -340,13 +340,13 @@ inventory=inventory.ini
|
|
|
;
|
|
|
}
|
|
|
|
|
|
- function addNginx($composer, $config = array(), $flavor = "dev"){
|
|
|
+ function addNginx($composer, $config = array(), $flavor = "dev"){
|
|
|
$version = "latest";
|
|
|
$fd_domain = "fd3.flowdat.com";
|
|
|
$host_env_file = "host.env";
|
|
|
extract($config);
|
|
|
|
|
|
- $composer->addService("nginx")->build("extra/nginx/")
|
|
|
+ $composer->addService("nginx")->build("extra/nginx/")
|
|
|
->image($registry."fd3/nginx:".$version)
|
|
|
->addEnv_file($host_env_file)
|
|
|
->restart("always")
|
|
@@ -386,10 +386,32 @@ inventory=inventory.ini
|
|
|
->addVolumes("./extra/supervisord/sshd_config", "/etc/ssh/sshd_config")
|
|
|
->addVolumes("./extra/supervisord/bin/fiberhome", "/usr/bin/fiberhome")
|
|
|
->addVolumes("./extra/supervisord/bin/fiberlink", "/usr/bin/fiberlink")
|
|
|
-
|
|
|
+
|
|
|
;
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * @param \Docker\Composer\FileFormat2 $composer
|
|
|
+ * @param array $config
|
|
|
+ * @param string $flavor
|
|
|
+ */
|
|
|
+ public function addSupervisord($composer, $config = array(), $flavor = "dev")
|
|
|
+ {
|
|
|
+ $version = "latest";
|
|
|
+ extract($config);
|
|
|
+
|
|
|
+ $composer->addService("supervisord")->build("./extra/supervisord")
|
|
|
+ ->image($registry."fd3/supervisord:$version")
|
|
|
+ ->privileged(true)
|
|
|
+ ->restart("always")
|
|
|
+ ->addLinks("mongodb")
|
|
|
+ ->addLinks("mysql")
|
|
|
+ ->addVolumes("./extra/supervisord/", "/etc/supervisord/")
|
|
|
+ ->addVolumes("./extra/supervisord/var/", "/var/log/supervisor/")
|
|
|
+ ->addVolumes("./extra/supervisord/sshd_config", "/etc/ssh/sshd_config")
|
|
|
+ ->addVolumes("./extra/supervisord/bin/fiberhome", "/usr/bin/fiberhome")
|
|
|
+ ->addVolumes("./extra/supervisord/bin/fiberlink", "/usr/bin/fiberlink");
|
|
|
+ }
|
|
|
|
|
|
function addMySql($composer, $config = array(), $flavor = "dev"){
|
|
|
$version = "latest";
|
|
@@ -613,7 +635,7 @@ $oauth_client_secret = "5w7gx6ptdoo4g8cwwo88o8gowosgco84sso08ssow0osg88g8k";
|
|
|
/* Apps / Web UI */
|
|
|
/**************************************************************************************/
|
|
|
|
|
|
- $this->addBase($composer, $base_vars);
|
|
|
+ $this->addBase($composer, $base_vars);
|
|
|
$this->addFtth($composer, $base_vars);
|
|
|
$this->addStats($composer, $base_vars);
|
|
|
$this->addCablemodem($composer, $base_vars);
|
|
@@ -677,7 +699,7 @@ $oauth_client_secret = "5w7gx6ptdoo4g8cwwo88o8gowosgco84sso08ssow0osg88g8k";
|
|
|
// ->addEnviroment("HTTPS_METHOD", "nohttps")
|
|
|
//;
|
|
|
|
|
|
-
|
|
|
+
|
|
|
return $composer->render();
|
|
|
}
|
|
|
}
|