1
0
Fork 0
mirror of synced 2024-07-03 13:41:01 +12:00

Fixed default https port number

This commit is contained in:
Eldad Fux 2020-09-16 01:20:28 +03:00
parent 7a2239a015
commit 3567e32da9

View file

@ -34,7 +34,7 @@ $cli
$path = '/usr/src/code/appwrite'; $path = '/usr/src/code/appwrite';
$defaultHTTPPort = '80'; $defaultHTTPPort = '80';
$defaultHTTPSPort = '443'; $defaultHTTPSPort = '443';
Console::success('Starting Appwrite installation...'); Console::success('Starting Appwrite installation...');
// Create directory with write permissions // Create directory with write permissions
@ -50,10 +50,10 @@ $cli
if($data !== false) { if($data !== false) {
$compose = new Compose($data); $compose = new Compose($data);
$appwrite = $compose->getService('appwrite'); $appwrite = $compose->getService('appwrite');
$version = ($appwrite) ? $appwrite->getImageVersion() : $version; $oldVersion = ($appwrite) ? $appwrite->getImageVersion() : null;
$ports = $compose->getService('traefik')->getPorts(); $ports = $compose->getService('traefik')->getPorts();
if($version) { if($oldVersion) {
foreach($compose->getServices() as $service) { // Fetch all env vars from previous compose file foreach($compose->getServices() as $service) { // Fetch all env vars from previous compose file
if(!$service) { if(!$service) {
continue; continue;
@ -100,7 +100,7 @@ $cli
$httpPort = ($httpPort) ? $httpPort : $defaultHTTPPort; $httpPort = ($httpPort) ? $httpPort : $defaultHTTPPort;
$httpsPort = Console::confirm('Choose your server HTTPS port: (default: '.$defaultHTTPSPort.')'); $httpsPort = Console::confirm('Choose your server HTTPS port: (default: '.$defaultHTTPSPort.')');
$httpsPort = ($httpsPort) ? $httpsPort : $defaultHTTPPort; $httpsPort = ($httpsPort) ? $httpsPort : $defaultHTTPSPort;
$input = []; $input = [];
@ -119,11 +119,11 @@ $cli
$templateForCompose = new View(__DIR__.'/../views/install/compose.phtml'); $templateForCompose = new View(__DIR__.'/../views/install/compose.phtml');
$templateForEnv = new View(__DIR__.'/../views/install/env.phtml'); $templateForEnv = new View(__DIR__.'/../views/install/env.phtml');
$templateForCompose $templateForCompose
->setParam('httpPort', $httpPort) ->setParam('httpPort', $httpPort)
->setParam('httpsPort', $httpsPort) ->setParam('httpsPort', $httpsPort)
->setParam('version', APP_VERSION_STABLE) ->setParam('version', $version)
; ;
$templateForEnv $templateForEnv