no message
This commit is contained in:
@@ -14,17 +14,16 @@ use App\Module\Base;
|
||||
class AppsController extends AbstractController
|
||||
{
|
||||
|
||||
public function test()
|
||||
public function up()
|
||||
{
|
||||
$appName = 'MysqlExposePort';
|
||||
|
||||
$dirPath = base_path('docker/apps/' . $appName);
|
||||
$filePath = $dirPath . '/docker-compose.yml';
|
||||
$savePath = $dirPath . '/docker-compose-local.yml';
|
||||
$savePath = $dirPath . '/docker-compose.doo.yml';
|
||||
|
||||
$res = Apps::generateDockerComposeYml($filePath, $savePath, [
|
||||
'config' => [
|
||||
'PROXY_PORT' => '33062',
|
||||
]
|
||||
'PROXY_PORT' => '33062',
|
||||
]);
|
||||
if (!$res) {
|
||||
return Base::retError('生成docker-compose.yml失败');
|
||||
@@ -32,4 +31,10 @@ class AppsController extends AbstractController
|
||||
|
||||
return Apps::dockerComposeUp($appName);
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$appName = 'MysqlExposePort';
|
||||
return Apps::dockerComposeUp($appName, 'down');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user