commit
d93640a8d9
@ -16,8 +16,7 @@ class UpdateCoolify
|
||||
try {
|
||||
$settings = InstanceSettings::get();
|
||||
ray('Running InstanceAutoUpdateJob');
|
||||
$localhost_name = 'localhost';
|
||||
$this->server = Server::where('name', $localhost_name)->first();
|
||||
$this->server = Server::find(0)->first();
|
||||
if (!$this->server) {
|
||||
return;
|
||||
}
|
||||
|
@ -48,15 +48,15 @@ class SyncBunny extends Command
|
||||
|
||||
$versions = "versions.json";
|
||||
|
||||
PendingRequest::macro('storage', function ($file) use($that) {
|
||||
PendingRequest::macro('storage', function ($fileName) use($that) {
|
||||
$headers = [
|
||||
'AccessKey' => env('BUNNY_STORAGE_API_KEY'),
|
||||
'Accept' => 'application/json',
|
||||
'Content-Type' => 'application/octet-stream'
|
||||
];
|
||||
$fileStream = fopen($file, "r");
|
||||
$file = fread($fileStream, filesize($file));
|
||||
$that->info('Uploading: ' . $file);
|
||||
$fileStream = fopen($fileName, "r");
|
||||
$file = fread($fileStream, filesize($fileName));
|
||||
$that->info('Uploading: ' . $fileName);
|
||||
return PendingRequest::baseUrl('https://storage.bunnycdn.com')->withHeaders($headers)->withBody($file)->throw();
|
||||
});
|
||||
PendingRequest::macro('purge', function ($url) use ($that) {
|
||||
@ -77,7 +77,7 @@ class SyncBunny extends Command
|
||||
}
|
||||
if ($only_template) {
|
||||
Http::pool(fn (Pool $pool) => [
|
||||
$pool->storage(file: "$parent_dir/templates/$service_template")->put("/$bunny_cdn_storage_name/$bunny_cdn_path/$service_template"),
|
||||
$pool->storage(fileName: "$parent_dir/templates/$service_template")->put("/$bunny_cdn_storage_name/$bunny_cdn_path/$service_template"),
|
||||
$pool->purge("$bunny_cdn/$bunny_cdn_path/$service_template"),
|
||||
]);
|
||||
$this->info('Service template uploaded & purged...');
|
||||
|
@ -7,7 +7,7 @@ return [
|
||||
|
||||
// The release version of your application
|
||||
// Example with dynamic git hash: trim(exec('git --git-dir ' . base_path('.git') . ' log --pretty="%h" -n1 HEAD'))
|
||||
'release' => '4.0.0-beta.47',
|
||||
'release' => '4.0.0-beta.48',
|
||||
// When left empty or `null` the Laravel environment will be used
|
||||
'environment' => config('app.env'),
|
||||
|
||||
|
@ -1,3 +1,3 @@
|
||||
<?php
|
||||
|
||||
return '4.0.0-beta.47';
|
||||
return '4.0.0-beta.48';
|
||||
|
@ -4,7 +4,7 @@
|
||||
"version": "3.12.36"
|
||||
},
|
||||
"v4": {
|
||||
"version": "4.0.0-beta.47"
|
||||
"version": "4.0.0-beta.48"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user