From: Dan Brown Date: Wed, 3 May 2023 09:45:45 +0000 (+0100) Subject: Added general warning on all app usage about alpha status X-Git-Url: http://source.bookstackapp.com/system-cli/commitdiff_plain/a31a091a6be3930bff1500ad4e13394b154a3536 Added general warning on all app usage about alpha status - Also upped more timeouts. - Added extra advisory text for restore regarding permissions. --- diff --git a/run.php b/run.php index 56d1952..6fb523c 100644 --- a/run.php +++ b/run.php @@ -1,5 +1,6 @@ #!/usr/bin/env php setStyle('error', new OutputFormatterStyle('red')); // Run the command and handle errors try { + $output->writeln("WARNING: This CLI is in early alpha testing."); + $output->writeln("There's a high chance of running into bugs, and the CLI API is subject to change."); + $output->writeln(""); + $app->run(null, $output); } catch (Exception $error) { $output = (new ConsoleOutput())->getErrorOutput(); diff --git a/src/Commands/InitCommand.php b/src/Commands/InitCommand.php index a82b02d..4ebd267 100644 --- a/src/Commands/InitCommand.php +++ b/src/Commands/InitCommand.php @@ -71,7 +71,7 @@ class InitCommand extends Command { $errors = (new ProgramRunner('php', '/usr/bin/php')) ->withTimeout(60) - ->withIdleTimeout(5) + ->withIdleTimeout(15) ->withEnvironment(EnvironmentLoader::load($installDir)) ->runCapturingAllOutput([ Paths::join($installDir, 'artisan'), diff --git a/src/Commands/RestoreCommand.php b/src/Commands/RestoreCommand.php index 4a5fad7..f46d571 100644 --- a/src/Commands/RestoreCommand.php +++ b/src/Commands/RestoreCommand.php @@ -120,6 +120,8 @@ class RestoreCommand extends Command $this->deleteDirectoryAndContents($extractDir); $output->writeln("\nRestore operation complete!"); + $output->writeln("You may need to fix file/folder permissions so that the webserver has"); + $output->writeln("the required read/write access to the necessary directories & files."); return Command::SUCCESS; } diff --git a/src/Services/MySqlRunner.php b/src/Services/MySqlRunner.php index 8a91aad..f911069 100644 --- a/src/Services/MySqlRunner.php +++ b/src/Services/MySqlRunner.php @@ -50,8 +50,8 @@ class MySqlRunner { $output = (new ProgramRunner('mysql', '/usr/bin/mysql')) ->withEnvironment(['MYSQL_PWD' => $this->password]) - ->withTimeout(240) - ->withIdleTimeout(5) + ->withTimeout(300) + ->withIdleTimeout(300) ->runCapturingStdErr([ '-h', $this->host, '-P', $this->port, @@ -94,8 +94,8 @@ HEREDOC; try { (new ProgramRunner('mysqldump', '/usr/bin/mysqldump')) - ->withTimeout(240) - ->withIdleTimeout(15) + ->withTimeout(300) + ->withIdleTimeout(300) ->withEnvironment(['MYSQL_PWD' => $this->password]) ->runWithoutOutputCallbacks([ '-h', $this->host,