diff --git a/scripts/network/variables/variables_init_app.sh b/scripts/network/variables/variables_init_app.sh index 9515519..df5e9ad 100755 --- a/scripts/network/variables/variables_init_app.sh +++ b/scripts/network/variables/variables_init_app.sh @@ -35,7 +35,16 @@ initializeAppVariables() app_title="${!app_title_var}" domain_var_name="CFG_DOMAIN_${domain}" domain_full="${!domain_var_name}" - host_setup=${app_name}.${domain_full} + # FQDN for this app's Traefik Host() rule (also feeds the app URL and + # trusted-domains): + # HOST_NAME="@" or "root" -> (apex / root of domain) + # HOST_NAME set -> . (custom subdomain) + # HOST_NAME empty -> . (fallback default) + if [[ "$host_name" == "@" || "$host_name" == "root" ]]; then + host_setup="${domain_full}" + else + host_setup="${host_name:-$app_name}.${domain_full}" + fi ssl_key=${domain_full}.key ssl_crt=${domain_full}.crt diff --git a/scripts/webui/data/generators/categories/webui_create_app_field_mappings.sh b/scripts/webui/data/generators/categories/webui_create_app_field_mappings.sh index c4e896a..8e29f3a 100755 --- a/scripts/webui/data/generators/categories/webui_create_app_field_mappings.sh +++ b/scripts/webui/data/generators/categories/webui_create_app_field_mappings.sh @@ -83,8 +83,8 @@ webuiCreateAppFieldMappings() { "category": "network", "label": "Hostname", "type": "text", - "tooltip": "The hostname for this application", - "placeholder": "myapp" + "tooltip": "Subdomain this app is served on — e.g. myapp becomes myapp.yourdomain.com. Use @ to serve it on the root of your domain (yourdomain.com itself).", + "placeholder": "myapp · @ = root domain" }, "DOMAIN": { "category": "network",