revert revert so it will be good (say what?)

This commit is contained in:
Andras Bacsai
2025-01-17 13:44:37 +01:00
parent 78cd01d230
commit 6e9960c010
3 changed files with 37 additions and 39 deletions

View File

@@ -17,7 +17,7 @@
"doctrine/dbal": "^4.2", "doctrine/dbal": "^4.2",
"guzzlehttp/guzzle": "^7.5.0", "guzzlehttp/guzzle": "^7.5.0",
"laravel/fortify": "^1.16.0", "laravel/fortify": "^1.16.0",
"laravel/framework": "11.35.0", "laravel/framework": "^11.0",
"laravel/horizon": "^5.29.1", "laravel/horizon": "^5.29.1",
"laravel/pail": "^1.1", "laravel/pail": "^1.1",
"laravel/prompts": "^0.1.18|^0.2.0|^0.3.0", "laravel/prompts": "^0.1.18|^0.2.0|^0.3.0",

17
composer.lock generated
View File

@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically" "This file is @generated automatically"
], ],
"content-hash": "ef45e2ecf9ff00aa6c51c0f49fd072e0", "content-hash": "9c1a0833be38d1f058f216dcaa522077",
"packages": [ "packages": [
{ {
"name": "3sidedcube/laravel-redoc", "name": "3sidedcube/laravel-redoc",
@@ -2733,16 +2733,16 @@
}, },
{ {
"name": "laravel/framework", "name": "laravel/framework",
"version": "v11.35.0", "version": "v11.38.2",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/laravel/framework.git", "url": "https://github.com/laravel/framework.git",
"reference": "f1a7aaa3c1235b7a95ccaa58db90e0cd9d8c3fcc" "reference": "9d290aa90fcad44048bedca5219d2b872e98772a"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/laravel/framework/zipball/f1a7aaa3c1235b7a95ccaa58db90e0cd9d8c3fcc", "url": "https://api.github.com/repos/laravel/framework/zipball/9d290aa90fcad44048bedca5219d2b872e98772a",
"reference": "f1a7aaa3c1235b7a95ccaa58db90e0cd9d8c3fcc", "reference": "9d290aa90fcad44048bedca5219d2b872e98772a",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -2763,7 +2763,7 @@
"guzzlehttp/uri-template": "^1.0", "guzzlehttp/uri-template": "^1.0",
"laravel/prompts": "^0.1.18|^0.2.0|^0.3.0", "laravel/prompts": "^0.1.18|^0.2.0|^0.3.0",
"laravel/serializable-closure": "^1.3|^2.0", "laravel/serializable-closure": "^1.3|^2.0",
"league/commonmark": "^2.2.1", "league/commonmark": "^2.6",
"league/flysystem": "^3.25.1", "league/flysystem": "^3.25.1",
"league/flysystem-local": "^3.25.1", "league/flysystem-local": "^3.25.1",
"league/uri": "^7.5.1", "league/uri": "^7.5.1",
@@ -2778,7 +2778,7 @@
"symfony/console": "^7.0.3", "symfony/console": "^7.0.3",
"symfony/error-handler": "^7.0.3", "symfony/error-handler": "^7.0.3",
"symfony/finder": "^7.0.3", "symfony/finder": "^7.0.3",
"symfony/http-foundation": "^7.0.3", "symfony/http-foundation": "^7.2.0",
"symfony/http-kernel": "^7.0.3", "symfony/http-kernel": "^7.0.3",
"symfony/mailer": "^7.0.3", "symfony/mailer": "^7.0.3",
"symfony/mime": "^7.0.3", "symfony/mime": "^7.0.3",
@@ -2792,7 +2792,6 @@
"voku/portable-ascii": "^2.0.2" "voku/portable-ascii": "^2.0.2"
}, },
"conflict": { "conflict": {
"mockery/mockery": "1.6.8",
"tightenco/collect": "<5.5.33" "tightenco/collect": "<5.5.33"
}, },
"provide": { "provide": {
@@ -2944,7 +2943,7 @@
"issues": "https://github.com/laravel/framework/issues", "issues": "https://github.com/laravel/framework/issues",
"source": "https://github.com/laravel/framework" "source": "https://github.com/laravel/framework"
}, },
"time": "2024-12-10T16:09:29+00:00" "time": "2025-01-15T00:06:46+00:00"
}, },
{ {
"name": "laravel/horizon", "name": "laravel/horizon",

View File

@@ -63,13 +63,40 @@ class ProductionSeeder extends Seeder
]); ]);
} }
if (! isCloud() && config('constants.coolify.is_windows_docker_desktop') == false) {
$coolify_key_name = '@host.docker.internal';
$ssh_keys_directory = Storage::disk('ssh-keys')->files();
$coolify_key = collect($ssh_keys_directory)->firstWhere(fn ($item) => str($item)->contains($coolify_key_name));
$private_key_found = PrivateKey::find(0);
if (! $private_key_found) {
if ($coolify_key) {
$user = str($coolify_key)->before('@')->after('id.');
$coolify_key = Storage::disk('ssh-keys')->get($coolify_key);
PrivateKey::create([
'id' => 0,
'team_id' => 0,
'name' => 'localhost\'s key',
'description' => 'The private key for the Coolify host machine (localhost).',
'private_key' => $coolify_key,
]);
echo "SSH key found for the Coolify host machine (localhost).\n";
} else {
echo "No SSH key found for the Coolify host machine (localhost).\n";
echo "Please read the following documentation (point 3) to fix it: https://coolify.
io/docs/knowledge-base/server/openssh/\n";
echo "Your localhost connection won't work until then.";
}
}
}
if (! isCloud()) { if (! isCloud()) {
if (Server::find(0) == null) { if (Server::find(0) == null) {
$server_details = [ $server_details = [
'id' => 0, 'id' => 0,
'name' => 'localhost', 'name' => 'localhost',
'description' => "This is the server where Coolify is running on. Don't delete this!", 'description' => "This is the server where Coolify is running on. Don't delete this!",
'user' => 'root', 'user' => $user,
'ip' => 'host.docker.internal', 'ip' => 'host.docker.internal',
'team_id' => 0, 'team_id' => 0,
'private_key_id' => 0, 'private_key_id' => 0,
@@ -98,35 +125,7 @@ class ProductionSeeder extends Seeder
]); ]);
} }
} }
if (! isCloud() && config('constants.coolify.is_windows_docker_desktop') == false) {
$coolify_key_name = '@host.docker.internal';
$ssh_keys_directory = Storage::disk('ssh-keys')->files();
$coolify_key = collect($ssh_keys_directory)->firstWhere(fn ($item) => str($item)->contains($coolify_key_name));
$private_key_found = PrivateKey::find(0);
if (! $private_key_found) {
if ($coolify_key) {
$user = str($coolify_key)->before('@')->after('id.');
$coolify_key = Storage::disk('ssh-keys')->get($coolify_key);
PrivateKey::create([
'id' => 0,
'team_id' => 0,
'name' => 'localhost\'s key',
'description' => 'The private key for the Coolify host machine (localhost).',
'private_key' => $coolify_key,
]);
$server = Server::find(0);
$server->user = $user;
$server->save();
echo "SSH key found for the Coolify host machine (localhost).\n";
} else {
echo "No SSH key found for the Coolify host machine (localhost).\n";
echo "Please read the following documentation (point 3) to fix it: https://coolify.
io/docs/knowledge-base/server/openssh/\n";
echo "Your localhost connection won't work until then.";
}
}
}
if (config('constants.coolify.is_windows_docker_desktop')) { if (config('constants.coolify.is_windows_docker_desktop')) {
PrivateKey::updateOrCreate( PrivateKey::updateOrCreate(
[ [