mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
update: send mock/default values from backend.
update: update task callback.
This commit is contained in:
@@ -8,15 +8,12 @@ $defaultHttpPort = $defaultHttpPort ?? '80';
|
||||
$defaultHttpsPort = $defaultHttpsPort ?? '443';
|
||||
$defaultAppDomain = $vars['_APP_DOMAIN']['default'] ?? 'localhost';
|
||||
$defaultAppDomain = ($defaultAppDomain === 'traefik') ? 'localhost' : $defaultAppDomain;
|
||||
$defaultEmailCertificates = $vars['_APP_EMAIL_CERTIFICATES']['default'] ?? '';
|
||||
$defaultEmailCertificates = $defaultEmailCertificates ?? '';
|
||||
$defaultSecretKey = $vars['_APP_OPENSSL_KEY_V1']['default'] ?? '';
|
||||
$defaultAssistantOpenAIKey = $vars['_APP_ASSISTANT_OPENAI_API_KEY']['default'] ?? '';
|
||||
$defaultDatabase = $vars['_APP_DB_ADAPTER']['default'] ?? 'mongodb';
|
||||
$lockedDatabase = $isUpgrade && empty($lockedDatabase) ? $defaultDatabase : $lockedDatabase;
|
||||
$isLocalInstall = $isLocalInstall ?? false;
|
||||
if ($installMode === 'mock' && $defaultEmailCertificates === '') {
|
||||
$defaultEmailCertificates = 'walterobrien@example.com';
|
||||
}
|
||||
|
||||
$step = isset($_GET['step']) ? (int) $_GET['step'] : 1;
|
||||
$step = max(1, min(5, $step));
|
||||
|
||||
@@ -558,6 +558,11 @@ class HttpHandler
|
||||
$isMock = $this->config->isMock();
|
||||
$isLocalInstall = $this->config->isLocal();
|
||||
|
||||
$defaultEmailCertificates = $vars['_APP_EMAIL_CERTIFICATES']['default'] ?? '';
|
||||
if ($isMock && empty($defaultEmailCertificates)) {
|
||||
$defaultEmailCertificates = 'walterobrien@example.com';
|
||||
}
|
||||
|
||||
include $this->paths['views'] . '/installer.phtml';
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -29,10 +29,10 @@ class Upgrade extends Install
|
||||
->param('image', 'appwrite', new Text(0), 'Main appwrite docker image', true)
|
||||
->param('interactive', 'Y', new Text(1), 'Run an interactive session', true)
|
||||
->param('no-start', false, new Boolean(true), 'Run an interactive session', true)
|
||||
->callback($this->action(...));
|
||||
->callback($this->upgradeAction(...));
|
||||
}
|
||||
|
||||
public function action(string $httpPort, string $httpsPort, string $organization, string $image, string $interactive, bool $noStart, bool $isUpgrade = false): void
|
||||
public function upgradeAction(string $httpPort, string $httpsPort, string $organization, string $image, string $interactive, bool $noStart): void
|
||||
{
|
||||
$isLocalInstall = $this->isLocalInstall();
|
||||
$this->applyLocalPaths($isLocalInstall, true);
|
||||
|
||||
Reference in New Issue
Block a user