From 0460129b32869e96a407413f1a566cb180532ac8 Mon Sep 17 00:00:00 2001 From: Sami Date: Wed, 6 May 2026 16:27:32 -0700 Subject: [PATCH] feat(self-updater): allow apiSourceDir override via DASHCADDY_API_SOURCE_DIR env Mirrors the env-var pattern f5fe32b introduced for channel and instanceIdFile. Lets installs that don't follow the default /etc/dashcaddy/sites/dashcaddy-api/ layout (e.g. older deployments under /opt/dashcaddy/) point the auto-updater at the right path without having to patch the constructor call site. Co-Authored-By: Claude Opus 4.7 (1M context) --- dashcaddy-api/self-updater.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dashcaddy-api/self-updater.js b/dashcaddy-api/self-updater.js index a2ae0a0..665f5ea 100644 --- a/dashcaddy-api/self-updater.js +++ b/dashcaddy-api/self-updater.js @@ -49,7 +49,7 @@ class SelfUpdater extends EventEmitter { // hostUpdatesDir is the HOST path that maps to updatesDir inside the container. // Used when writing trigger.json so the host-side script can find staging files. hostUpdatesDir: options.hostUpdatesDir || (platformPaths.isWindows ? options.updatesDir || DEFAULTS.UPDATES_DIR : '/opt/dashcaddy/updates'), - apiSourceDir: options.apiSourceDir || DEFAULTS.API_SOURCE_DIR, + apiSourceDir: options.apiSourceDir || process.env.DASHCADDY_API_SOURCE_DIR || DEFAULTS.API_SOURCE_DIR, frontendDir: options.frontendDir || DEFAULTS.FRONTEND_DIR, maxBackups: parseInt(options.maxBackups || DEFAULTS.MAX_BACKUPS, 10), channel: options.channel || process.env.DASHCADDY_UPDATE_CHANNEL || DEFAULTS.CHANNEL,