mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
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:
co-authored by
Claude Opus 4.6
parent
c9d023991d
commit
1ad2cd68ef
@@ -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())
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user