no message

This commit is contained in:
kuaifan
2025-05-04 22:40:38 +08:00
parent 5414accc6c
commit 5a0d1ac0c0
3 changed files with 54 additions and 12 deletions

View File

@@ -3,7 +3,8 @@
namespace App\Http\Controllers\Api;
use App\Module\Docker;
use App\Module\Apps;
use App\Module\Base;
/**
* @apiDefine apps
@@ -15,13 +16,20 @@ class AppsController extends AbstractController
public function test()
{
$dirPath = base_path('docker/apps/MysqlExposePort');
$appName = 'MysqlExposePort';
$dirPath = base_path('docker/apps/' . $appName);
$filePath = $dirPath . '/docker-compose.yml';
$savePath = $dirPath . '/docker-compose-local.yml';
return Docker::generateComposeYml($filePath, $savePath, [
$res = Apps::generateDockerComposeYml($filePath, $savePath, [
'config' => [
'PROXY_PORT' => '33062',
]
]);
if (!$res) {
return Base::retError('生成docker-compose.yml失败');
}
return Apps::dockerComposeUp($appName);
}
}