feat: separate Public IP for DNS records from Server IP, improve settings help texts
- Add public_ip field to Settings for DNS A records (proxy/load balancer IP) - DNS records now use public_ip, falling back to server_ip if empty - Server IP renamed to "Server IP (Docker Host)" for clarity - Public IP labeled "Public IP (DNS Target)" - Updated help texts for domain, server IP, public IP, and Docker network - DB migration + schema for public_ip column
This commit is contained in:
@@ -287,11 +287,13 @@
|
||||
"title": "General Settings",
|
||||
"globalConfig": "Global Configuration",
|
||||
"domain": "Domain",
|
||||
"domainHelp": "Base domain for subdomain routing",
|
||||
"serverIp": "Server IP",
|
||||
"serverIpHelp": "Public IP address of the server",
|
||||
"domainHelp": "Base domain for subdomain routing (e.g., example.com → stage-dev-app.example.com)",
|
||||
"serverIp": "Server IP (Docker Host)",
|
||||
"serverIpHelp": "IP of the machine running Docker. Used for NPM remote forwarding.",
|
||||
"publicIp": "Public IP (DNS Target)",
|
||||
"publicIpHelp": "IP for DNS A records — typically your proxy/load balancer. Falls back to Server IP if empty.",
|
||||
"dockerNetwork": "Docker Network",
|
||||
"dockerNetworkHelp": "Docker network for deployed containers",
|
||||
"dockerNetworkHelp": "Docker network that containers and proxy share. Must match your NPM/Traefik network.",
|
||||
"subdomainPattern": "Subdomain Pattern",
|
||||
"subdomainPatternHelp": "Pattern for auto-generated subdomains",
|
||||
"subdomainVarsTitle": "Available variables",
|
||||
|
||||
@@ -287,11 +287,13 @@
|
||||
"title": "Общие настройки",
|
||||
"globalConfig": "Глобальная конфигурация",
|
||||
"domain": "Домен",
|
||||
"domainHelp": "Базовый домен для маршрутизации поддоменов",
|
||||
"serverIp": "IP сервера",
|
||||
"serverIpHelp": "Публичный IP-адрес сервера",
|
||||
"domainHelp": "Базовый домен для маршрутизации (напр., example.com → stage-dev-app.example.com)",
|
||||
"serverIp": "IP сервера (Docker Host)",
|
||||
"serverIpHelp": "IP машины с Docker. Используется для удалённого NPM.",
|
||||
"publicIp": "Публичный IP (для DNS)",
|
||||
"publicIpHelp": "IP для DNS A-записей — обычно адрес прокси/балансировщика. Если пусто, используется IP сервера.",
|
||||
"dockerNetwork": "Docker-сеть",
|
||||
"dockerNetworkHelp": "Docker-сеть для развёрнутых контейнеров",
|
||||
"dockerNetworkHelp": "Docker-сеть, общая для контейнеров и прокси. Должна совпадать с сетью NPM/Traefik.",
|
||||
"subdomainPattern": "Шаблон поддомена",
|
||||
"subdomainPatternHelp": "Шаблон для автоматически генерируемых поддоменов",
|
||||
"subdomainVarsTitle": "Доступные переменные",
|
||||
|
||||
@@ -100,6 +100,7 @@ export interface RegistryImage {
|
||||
export interface Settings {
|
||||
domain: string;
|
||||
server_ip: string;
|
||||
public_ip: string;
|
||||
network: string;
|
||||
subdomain_pattern: string;
|
||||
notification_url: string;
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
|
||||
let domain = $state('');
|
||||
let serverIp = $state('');
|
||||
let publicIp = $state('');
|
||||
let network = $state('');
|
||||
let subdomainPattern = $state('');
|
||||
let pollingInterval = $state('');
|
||||
@@ -118,6 +119,7 @@
|
||||
const settings = await getSettings();
|
||||
domain = settings.domain ?? '';
|
||||
serverIp = settings.server_ip ?? '';
|
||||
publicIp = settings.public_ip ?? '';
|
||||
network = settings.network ?? '';
|
||||
subdomainPattern = settings.subdomain_pattern ?? '';
|
||||
pollingInterval = parseDurationToSeconds(settings.polling_interval ?? '60');
|
||||
@@ -148,7 +150,7 @@
|
||||
saving = true;
|
||||
try {
|
||||
const payload: Record<string, unknown> = {
|
||||
domain: domain.trim(), server_ip: serverIp.trim(), network: network.trim(),
|
||||
domain: domain.trim(), server_ip: serverIp.trim(), public_ip: publicIp.trim(), network: network.trim(),
|
||||
subdomain_pattern: subdomainPattern.trim(), polling_interval: secondsToDuration(pollingInterval),
|
||||
base_volume_path: baseVolumePath.trim(), notification_url: notificationUrl.trim(),
|
||||
proxy_provider: proxyProvider,
|
||||
@@ -271,7 +273,8 @@
|
||||
<h2 class="mb-4 text-lg font-semibold text-[var(--text-primary)]">{$t('settingsGeneral.globalConfig')}</h2>
|
||||
<div class="grid grid-cols-1 gap-4 md:grid-cols-2">
|
||||
<FormField label={$t('settingsGeneral.domain')} name="domain" bind:value={domain} placeholder="example.com" error={errors.domain ?? ''} helpText={$t('settingsGeneral.domainHelp')} />
|
||||
<FormField label={$t('settingsGeneral.serverIp')} name="serverIp" bind:value={serverIp} placeholder="93.84.96.191" error={errors.serverIp ?? ''} helpText={$t('settingsGeneral.serverIpHelp')} />
|
||||
<FormField label={$t('settingsGeneral.serverIp')} name="serverIp" bind:value={serverIp} placeholder="192.168.1.100" error={errors.serverIp ?? ''} helpText={$t('settingsGeneral.serverIpHelp')} />
|
||||
<FormField label={$t('settingsGeneral.publicIp')} name="publicIp" bind:value={publicIp} placeholder="93.84.96.191" helpText={$t('settingsGeneral.publicIpHelp')} />
|
||||
<FormField label={$t('settingsGeneral.dockerNetwork')} name="network" bind:value={network} placeholder="staging-net" helpText={$t('settingsGeneral.dockerNetworkHelp')} />
|
||||
<div>
|
||||
<div class="flex items-center gap-1.5">
|
||||
|
||||
Reference in New Issue
Block a user