bug fix: prevent dockerapps to be created by less ram

This commit is contained in:
usmannasir
2024-02-05 12:43:08 +05:00
parent f07cfcefc4
commit 3d1623cbf7
2 changed files with 11 additions and 2 deletions

View File

@@ -64,8 +64,6 @@
<a href="http://{$ web.domain $}" target="_blank" title="Visit Site">
<h2 style="display: inline; color: #414C59;" ng-bind="web.domain"></h2>
</a>
<a target="_self" href="/filemanager/{$ web.domain $}" title="Open File Manager"> --
{% trans "File Manager" %}</a>
</div>
<div class="col-md-2 content-box-header" style="text-transform: none;">
<a href="/docker/manage/{$ web.id $}/app" target="_self" title="Manage Website">

View File

@@ -6887,6 +6887,17 @@ StrictHostKeyChecking no
WPemal = data['WPemal']
WPpasswd = data['WPpasswd']
if int(MYsqlRam) < 256:
final_dic = {'status': 0, 'error_message': 'Minimum MySQL ram should be 512MB.'}
final_json = json.dumps(final_dic)
return HttpResponse(final_json)
if int(SiteRam) < 256:
final_dic = {'status': 0, 'error_message': 'Minimum site ram should be 512MB.'}
final_json = json.dumps(final_dic)
return HttpResponse(final_json)
pattern = r"^[a-z0-9][a-z0-9]*$"
if re.match(pattern, sitename):