fix: rewrite compose/env files during upgrade so new image versions are applied

useExistingConfig was preventing the compose template from being
rewritten on non-local upgrades, leaving old image version tags in
place. Also fix Upgrade reading hardcoded .env instead of
getEnvFileName().

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Jake Barnby
2026-03-20 19:12:47 +13:00
co-authored by Claude Opus 4.6
parent c9d023991d
commit 1ad2cd68ef
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -508,7 +508,7 @@ class Install extends Action
$this->applyLocalPaths($isLocalInstall, false);
$isCLI = php_sapi_name() === 'cli';
if ($isLocalInstall) {
if ($isLocalInstall || $isUpgrade) {
$useExistingConfig = false;
} else {
$useExistingConfig = file_exists($this->path . '/' . $this->getComposeFileName())
+1 -1
View File
@@ -72,7 +72,7 @@ class Upgrade extends Install
}
if ($database === null) {
$envData = @file_get_contents($this->path . '/.env');
$envData = @file_get_contents($this->path . '/' . $this->getEnvFileName());
if ($envData !== false) {
$envFile = new Env($envData);
$database = $envFile->list()['_APP_DB_ADAPTER'] ?? null;