mirror of
https://github.com/vitodeploy/vito.git
synced 2025-07-01 05:56:16 +00:00
Compare commits
3 Commits
Author | SHA1 | Date | |
---|---|---|---|
705d029a63 | |||
7be63384d4 | |||
dd78c86a60 |
@ -86,6 +86,9 @@ private function install(Server $server): void
|
||||
while ($maxWait > 0) {
|
||||
sleep(10);
|
||||
$maxWait -= 10;
|
||||
if (! $server->provider()->isRunning()) {
|
||||
continue;
|
||||
}
|
||||
try {
|
||||
$server->ssh()->connect();
|
||||
break;
|
||||
|
@ -149,6 +149,10 @@ public function isRunning(): bool
|
||||
$this->server->save();
|
||||
}
|
||||
|
||||
if (! $this->server->ip) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (isset($result['Reservations'][0]['Instances'][0]['State']) && isset($result['Reservations'][0]['Instances'][0]['State']['Name'])) {
|
||||
$status = $result['Reservations'][0]['Instances'][0]['State']['Name'];
|
||||
if ($status == 'running') {
|
||||
|
@ -176,6 +176,10 @@ public function isRunning(): bool
|
||||
$this->server->save();
|
||||
}
|
||||
|
||||
if (! $this->server->ip) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return $status->json()['droplet']['status'] == 'active';
|
||||
}
|
||||
|
||||
|
@ -171,6 +171,10 @@ public function isRunning(): bool
|
||||
$this->server->save();
|
||||
}
|
||||
|
||||
if (! $this->server->ip) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return $status->json()['instance']['status'] == 'active';
|
||||
}
|
||||
|
||||
|
@ -211,7 +211,7 @@
|
||||
// 'ExampleClass' => App\Example\ExampleClass::class,
|
||||
])->toArray(),
|
||||
|
||||
'version' => '2.1.0',
|
||||
'version' => '2.2.1',
|
||||
|
||||
'demo' => env('APP_DEMO', false),
|
||||
];
|
||||
|
@ -1,4 +1,4 @@
|
||||
if ! echo '{{ $cron }}' | sudo -u {{ $user }} crontab -; then
|
||||
if ! echo '{!! $cron !!}' | sudo -u {{ $user }} crontab -; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
||||
|
||||
|
@ -1,3 +1,3 @@
|
||||
if ! echo '{{ $key }}' | sudo tee -a ~/.ssh/authorized_keys; then
|
||||
if ! echo '{!! $key !!}' | sudo tee -a ~/.ssh/authorized_keys; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
||||
|
@ -1,4 +1,4 @@
|
||||
if ! echo '{{ $redirects }}' | sudo tee /etc/nginx/conf.d/{{ $domain }}_redirects; then
|
||||
if ! echo '{!! $redirects !!}' | sudo tee /etc/nginx/conf.d/{{ $domain }}_redirects; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
||||
|
||||
|
Reference in New Issue
Block a user