Configure panel mail and hosting defaults in the installer

This commit is contained in:
parkel committed 2026-11-22 21:43:37 +01:00
1 parent 23adbe7b2d
commit 570addf37a
5 files changed
+149 -6

No files matched your search

+16 -1
View File
@@ -9,7 +9,7 @@ from http.server import BaseHTTPRequestHandler, HTTPServer
from threading import Thread
from urllib.parse import parse_qs
from .cli import number
from .cli import comma_separated, number
from .config import REMOTE_MODES, InstallError, parse_plan, port
from .engine import Installer
@@ -36,6 +36,13 @@ for a different deployment.</p>
<label>Email<input name="email" type="email" required></label>
</fieldset>
{dns}{mail}
<fieldset><legend>New hosting accounts</legend>
<p>Separate multiple values with commas. You can also set these later.</p>
<label>IP addresses for hosted websites<input name="public_addresses"></label>
<label>Nameservers for new DNS zones<input name="nameservers"></label>
<label>Public sending IPs for hosted email
<input name="mail_sending_addresses"></label>
</fieldset>
<button type="submit">Review installation</button></form>"""
STYLE = """body{font:1rem system-ui,sans-serif;max-width:46rem;margin:auto;
padding:1rem;color:#14372e} fieldset{margin:1rem 0;border:1px solid #a9beb2;
@@ -100,6 +107,14 @@ def form_plan(fields):
)
data = {
"panel": panel,
"hosting": {
name: comma_separated(fields.get(name, ""))
for name in (
"public_addresses",
"nameservers",
"mail_sending_addresses",
)
},
"admin": {
"username": fields.get("username", ""),
"email": fields.get("email", ""),