mirror of
https://github.com/vitodeploy/vito.git
synced 2025-07-01 05:56:16 +00:00
fix docker ssh issue by downgrading phpseclib
This commit is contained in:
@ -20,7 +20,8 @@ public function check(Server $server): Server
|
||||
$server->status = ServerStatus::READY;
|
||||
$server->save();
|
||||
}
|
||||
} catch (Throwable) {
|
||||
} catch (Throwable $e) {
|
||||
throw $e;
|
||||
$server->status = ServerStatus::DISCONNECTED;
|
||||
$server->save();
|
||||
Notifier::send($server, new ServerDisconnected($server));
|
||||
|
@ -114,8 +114,12 @@ public function import(Request $request): RedirectResponse
|
||||
}
|
||||
File::move($extractPath.'/ssh-public.key', storage_path('ssh-public.key'));
|
||||
File::move($extractPath.'/ssh-private.pem', storage_path('ssh-private.pem'));
|
||||
File::moveDirectory($extractPath.'/key-pairs', storage_path('app/key-pairs'), true);
|
||||
File::moveDirectory($extractPath.'/server-logs', storage_path('app/server-logs'), true);
|
||||
if (File::exists($extractPath.'/key-pairs')) {
|
||||
move_directory($extractPath.'/key-pairs', storage_path('app/key-pairs'));
|
||||
}
|
||||
if (File::exists($extractPath.'/server-logs')) {
|
||||
move_directory($extractPath.'/server-logs', storage_path('app/server-logs'));
|
||||
}
|
||||
|
||||
return redirect()->route('vito-settings')
|
||||
->with('success', 'Settings imported successfully.');
|
||||
|
@ -277,3 +277,21 @@ function git_path(): ?string
|
||||
|
||||
return array_find($paths, fn ($path) => is_executable($path));
|
||||
}
|
||||
|
||||
function move_directory(string $from, string $to): void
|
||||
{
|
||||
// Remove any stale destination
|
||||
if (File::exists($to)) {
|
||||
File::deleteDirectory($to);
|
||||
}
|
||||
|
||||
// Ensure parent of $to exists
|
||||
File::ensureDirectoryExists(dirname($to));
|
||||
|
||||
// Copy + delete (works across mounts / volumes)
|
||||
if (! File::copyDirectory($from, $to)) {
|
||||
throw new RuntimeException("Could not copy [$from] to [$to]");
|
||||
}
|
||||
|
||||
File::deleteDirectory($from);
|
||||
}
|
||||
|
@ -20,7 +20,7 @@
|
||||
"laravel/tinker": "^2.8",
|
||||
"mobiledetect/mobiledetectlib": "^4.8",
|
||||
"opcodesio/log-viewer": "^3.17",
|
||||
"phpseclib/phpseclib": "~3.0",
|
||||
"phpseclib/phpseclib": "3.0.43",
|
||||
"spatie/laravel-route-attributes": "^1.24",
|
||||
"tightenco/ziggy": "^2.5"
|
||||
},
|
||||
|
26
composer.lock
generated
26
composer.lock
generated
@ -4,7 +4,7 @@
|
||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "f9540de1e2dd90b20d9fe05386e75252",
|
||||
"content-hash": "fc8ee6c13042c4df2cd39b59c4d80ac1",
|
||||
"packages": [
|
||||
{
|
||||
"name": "aws/aws-crt-php",
|
||||
@ -62,16 +62,16 @@
|
||||
},
|
||||
{
|
||||
"name": "aws/aws-sdk-php",
|
||||
"version": "3.345.0",
|
||||
"version": "3.346.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/aws/aws-sdk-php.git",
|
||||
"reference": "61b4675bc02db8d7f3e1ba6931dc827c5ae23aa8"
|
||||
"reference": "27401e70b1b01114e4e228861933eb7b78630be7"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/61b4675bc02db8d7f3e1ba6931dc827c5ae23aa8",
|
||||
"reference": "61b4675bc02db8d7f3e1ba6931dc827c5ae23aa8",
|
||||
"url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/27401e70b1b01114e4e228861933eb7b78630be7",
|
||||
"reference": "27401e70b1b01114e4e228861933eb7b78630be7",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -153,9 +153,9 @@
|
||||
"support": {
|
||||
"forum": "https://github.com/aws/aws-sdk-php/discussions",
|
||||
"issues": "https://github.com/aws/aws-sdk-php/issues",
|
||||
"source": "https://github.com/aws/aws-sdk-php/tree/3.345.0"
|
||||
"source": "https://github.com/aws/aws-sdk-php/tree/3.346.1"
|
||||
},
|
||||
"time": "2025-06-17T18:09:42+00:00"
|
||||
"time": "2025-06-19T18:05:45+00:00"
|
||||
},
|
||||
{
|
||||
"name": "bacon/bacon-qr-code",
|
||||
@ -3566,16 +3566,16 @@
|
||||
},
|
||||
{
|
||||
"name": "phpseclib/phpseclib",
|
||||
"version": "3.0.44",
|
||||
"version": "3.0.43",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/phpseclib/phpseclib.git",
|
||||
"reference": "1d0b5e7e1434678411787c5a0535e68907cf82d9"
|
||||
"reference": "709ec107af3cb2f385b9617be72af8cf62441d02"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/1d0b5e7e1434678411787c5a0535e68907cf82d9",
|
||||
"reference": "1d0b5e7e1434678411787c5a0535e68907cf82d9",
|
||||
"url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/709ec107af3cb2f385b9617be72af8cf62441d02",
|
||||
"reference": "709ec107af3cb2f385b9617be72af8cf62441d02",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -3656,7 +3656,7 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/phpseclib/phpseclib/issues",
|
||||
"source": "https://github.com/phpseclib/phpseclib/tree/3.0.44"
|
||||
"source": "https://github.com/phpseclib/phpseclib/tree/3.0.43"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@ -3672,7 +3672,7 @@
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2025-06-15T09:59:26+00:00"
|
||||
"time": "2024-12-14T21:12:59+00:00"
|
||||
},
|
||||
{
|
||||
"name": "pragmarx/google2fa",
|
||||
|
@ -1,7 +1,7 @@
|
||||
services:
|
||||
app:
|
||||
build:
|
||||
context: ./vendor/laravel/sail/runtimes/8.2
|
||||
context: ./vendor/laravel/sail/runtimes/8.4
|
||||
dockerfile: Dockerfile
|
||||
args:
|
||||
WWWGROUP: '${WWWGROUP}'
|
||||
@ -24,7 +24,7 @@ services:
|
||||
depends_on: { }
|
||||
worker:
|
||||
build:
|
||||
context: ./vendor/laravel/sail/runtimes/8.2
|
||||
context: ./vendor/laravel/sail/runtimes/8.4
|
||||
dockerfile: Dockerfile
|
||||
args:
|
||||
WWWGROUP: '${WWWGROUP}'
|
||||
|
@ -12,7 +12,7 @@ services:
|
||||
extra_hosts:
|
||||
- 'host.docker.internal:host-gateway'
|
||||
ports:
|
||||
- '${APP_PORT:-80}:80'
|
||||
- '${APP_PORT:-8000}:80'
|
||||
- '${VITE_PORT:-5173}:${VITE_PORT:-5173}'
|
||||
volumes:
|
||||
- "vito-storage:/var/www/html/storage"
|
||||
|
@ -50,9 +50,6 @@ if [ ! -f "$INIT_FLAG" ]; then
|
||||
# create sqlite database
|
||||
touch /var/www/html/storage/database.sqlite
|
||||
|
||||
# install default plugins
|
||||
php /var/www/html/artisan plugins:install https://github.com/vitodeploy/laravel-octane-plugin
|
||||
|
||||
# create the flag file to indicate completion of initialization tasks
|
||||
touch "$INIT_FLAG"
|
||||
fi
|
||||
|
Reference in New Issue
Block a user