versions on cdn
This commit is contained in:
parent
70d032ff23
commit
ea7d147d79
@ -41,6 +41,8 @@ public function handle()
|
||||
$docker_install_script = "install-docker.sh";
|
||||
$production_env = ".env.production";
|
||||
|
||||
$versions = "versions.json";
|
||||
|
||||
PendingRequest::macro('storage', function ($file) {
|
||||
$headers = [
|
||||
'AccessKey' => env('BUNNY_STORAGE_API_KEY'),
|
||||
@ -68,6 +70,7 @@ public function handle()
|
||||
$pool->storage(file: "$parent_dir/scripts/$upgrade_script")->put("/$bunny_cdn_storage_name/$bunny_cdn_path/$upgrade_script"),
|
||||
$pool->storage(file: "$parent_dir/scripts/$install_script")->put("/$bunny_cdn_storage_name/$bunny_cdn_path/$install_script"),
|
||||
$pool->storage(file: "$parent_dir/scripts/$docker_install_script")->put("/$bunny_cdn_storage_name/$bunny_cdn_path/$docker_install_script"),
|
||||
$pool->storage(file: "$parent_dir/$versions")->put("/$bunny_cdn_storage_name/$versions"),
|
||||
]);
|
||||
Http::pool(fn (Pool $pool) => [
|
||||
$pool->purge(url: "$bunny_cdn/$bunny_cdn_path/$compose_file"),
|
||||
@ -76,6 +79,7 @@ public function handle()
|
||||
$pool->purge(url: "$bunny_cdn/$bunny_cdn_path/$upgrade_script"),
|
||||
$pool->purge(url: "$bunny_cdn/$bunny_cdn_path/$install_script"),
|
||||
$pool->purge(url: "$bunny_cdn/$bunny_cdn_path/$docker_install_script"),
|
||||
$pool->purge(url: "$bunny_cdn/$versions"),
|
||||
]);
|
||||
echo "All files uploaded & purged...\n";
|
||||
return;
|
||||
|
@ -177,7 +177,7 @@ function instantRemoteProcess(array $command, Server $server, $throwError = true
|
||||
if (!function_exists('getLatestVersionOfCoolify')) {
|
||||
function getLatestVersionOfCoolify()
|
||||
{
|
||||
$response = Http::get('https://get.coollabs.io/versions.json');
|
||||
$response = Http::get('https://coolify-cdn.b-cdn.net/versions.json');
|
||||
$versions = $response->json();
|
||||
return data_get($versions, 'coolify.v4.version');
|
||||
}
|
||||
|
@ -1,57 +0,0 @@
|
||||
<template>
|
||||
<div class="flex justify-center">
|
||||
<div class="flex flex-col">
|
||||
<input @focus="toggle" @blur="toggleAndClear" v-model="search" class="w-96" placeholder="🪄 Let the magic happen... Just type...">
|
||||
<div v-if="menuOpen" class="absolute text-sm top-11 w-[25rem] bg-neutral-800">
|
||||
<div class="py-2 pl-4 cursor-pointer hover:bg-neutral-700" v-for="(item, index) in filteredItems(items)">
|
||||
{{ item.name }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
menuOpen : false,
|
||||
search: '',
|
||||
selectedMenus: '',
|
||||
items: [{
|
||||
name: 'Public Repository',
|
||||
tags: 'application,public,repository',
|
||||
tab: 'public-repo',
|
||||
}, {
|
||||
name: 'Private Repository (with GitHub App)',
|
||||
tags: 'application,private,repository',
|
||||
tab: 'github-private-repo-app'
|
||||
}, {
|
||||
name: 'Private Repository (with Deploy Key)',
|
||||
tags: 'application,private,repository',
|
||||
tab: 'github-private-repo-deploy-key'
|
||||
}, {
|
||||
name: 'Database',
|
||||
tags: 'data,database,mysql,postgres,sql,sqlite,redis,mongodb,maria,percona',
|
||||
tab: 'database'
|
||||
}],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
toggle() {
|
||||
this.menuOpen = !this.menuOpen
|
||||
},
|
||||
toggleAndClear() {
|
||||
this.menuOpen = false
|
||||
this.search = ''
|
||||
},
|
||||
filteredItems(items) {
|
||||
console.log(items)
|
||||
return items.filter(item => {
|
||||
return item.tags.toLowerCase().includes(this.search.toLowerCase()) || item.name.toLowerCase().includes(this.search.toLowerCase())
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
10
versions.json
Normal file
10
versions.json
Normal file
@ -0,0 +1,10 @@
|
||||
{
|
||||
"coolify": {
|
||||
"main": {
|
||||
"version": "3.12.31"
|
||||
},
|
||||
"v4": {
|
||||
"version": "4.0.0-nightly.3"
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user