feat: NPM remote mode for cross-machine deployments

- Add npm_remote setting: when enabled, proxy forwards to server_ip with
  published host ports instead of Docker container names
- Deployer looks up assigned host port via InspectContainerPort in remote mode
- Auto-remove stale containers with same name before creating new ones
- Add Remote NPM toggle with warning on NPM settings page
- DB migration + schema for npm_remote column
This commit is contained in:
2026-04-05 02:18:06 +03:00
parent f71f2275a2
commit 195ef3e7e5
10 changed files with 77 additions and 12 deletions
+4 -1
View File
@@ -373,7 +373,10 @@
"testing": "Testing...",
"testSuccess": "NPM connection successful",
"testFailed": "NPM connection failed",
"saveFailedConnection": "Cannot save \u2014 connection test failed"
"saveFailedConnection": "Cannot save \u2014 connection test failed",
"remoteMode": "Remote NPM",
"remoteModeHelp": "Enable when NPM runs on a different machine than Docker. Forwards to Server IP with published host ports.",
"remoteModeWarning": "Requires Server IP in General settings. Ports are auto-mapped to random host ports."
},
"settingsCredentials": {
"title": "Credentials",
+4 -1
View File
@@ -373,7 +373,10 @@
"testing": "Проверка...",
"testSuccess": "Подключение к NPM успешно",
"testFailed": "Не удалось подключиться к NPM",
"saveFailedConnection": "Невозможно сохранить — проверка соединения не пройдена"
"saveFailedConnection": "Невозможно сохранить — проверка соединения не пройдена",
"remoteMode": "Удалённый NPM",
"remoteModeHelp": "Включите, если NPM работает на другой машине. Перенаправление на IP сервера с опубликованными портами.",
"remoteModeWarning": "Требуется IP сервера в общих настройках. Порты автоматически привязываются к случайным портам хоста."
},
"settingsCredentials": {
"title": "Учётные данные",
+1
View File
@@ -106,6 +106,7 @@ export interface Settings {
has_npm_password: boolean;
/** Sent on PUT to update the password; never returned by GET. */
npm_password?: string;
npm_remote: boolean;
polling_interval: string;
base_volume_path: string;
ssl_certificate_id: number;