no message

This commit is contained in:
kuaifan
2025-05-05 00:09:24 +08:00
parent 5a0d1ac0c0
commit db3a17a2c8
3 changed files with 28 additions and 48 deletions

View File

@@ -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');
}
}