feat: 创建应用放开相应端口 (#520)

pull/522/head
zhengkunwang223 2023-04-06 17:16:16 +08:00 committed by GitHub
parent 1b5387dc5a
commit a481a8b322
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -318,6 +318,11 @@ func (a AppService) Install(ctx context.Context, req request.AppInstallCreate) (
}
go upApp(ctx, appInstall.GetComposePath(), appInstall)
go updateToolApp(appInstall)
ports := []int{appInstall.HttpPort}
if appInstall.HttpsPort > 0 {
ports = append(ports, appInstall.HttpsPort)
}
go OperateFirewallPort(nil, ports)
return &appInstall, nil
}