Have Sail and SSU. Runs a command on a remote host.

This commit is contained in:
Joao Patricio
2023-03-20 14:29:03 +00:00
parent bfdae4339c
commit 2d6af39ed0
2 changed files with 46 additions and 5 deletions

View File

@@ -26,7 +26,7 @@ class RunCommand extends Component
// Override manual to experiment
$override = 0;
if($override) {
if ($override) {
// Good to play with the throttle feature
$sleepingBeauty = 'x=1; while [ $x -le 40 ]; do sleep 0.1 && echo "Welcome $x times" $(( x++ )); done';
@@ -42,6 +42,23 @@ class RunCommand extends Component
$this->activity = coolifyProcess($this->command, 'testing-host');
}
public function runSleepingBeauty()
{
$this->isKeepAliveOn = true;
$this->activity = coolifyProcess('x=1; while [ $x -le 40 ]; do sleep 0.1 && echo "Welcome $x times" $(( x++ )); done', 'testing-host');
}
public function runDummyProjectBuild()
{
$this->isKeepAliveOn = true;
$this->activity = coolifyProcess(<<<EOT
cd projects/dummy-project
~/.docker/cli-plugins/docker-compose build --no-cache
EOT, 'testing-host');
}
public function polling()
{
$this->activity?->refresh();