1
0
mirror of https://github.com/1Panel-dev/1Panel.git synced 2025-01-19 08:19:15 +08:00

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

This commit is contained in:
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

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
}