Skip to content

An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.

update cdn

Andras Bacsai5f5dde6565a0
diff --git a/README.md b/README.md
index 35efc8c78e..29e0b67984 100644
--- a/README.md
+++ b/README.md
@@ -11,7 +11,7 @@ Thinks will be added here incrementally through PR's.
# Installation
```bash
-curl -fsSL https://coolify-cdn.b-cdn.net/files/install.sh | bash
+curl -fsSL https://cdn.coollabs.io/coolify/install.sh | bash
```
## Support
diff --git a/app/Console/Commands/SyncBunny.php b/app/Console/Commands/SyncBunny.php
index 88062fb6bb..48e903a1a9 100644
--- a/app/Console/Commands/SyncBunny.php
+++ b/app/Console/Commands/SyncBunny.php
@@ -28,9 +28,9 @@ class SyncBunny extends Command
*/
public function handle()
{
- $bunny_cdn = "https://coolify-cdn.b-cdn.net";
- $bunny_cdn_path = "files";
- $bunny_cdn_storage_name = "coolify-cdn";
+ $bunny_cdn = "https://cdn.coollabs.io";
+ $bunny_cdn_path = "coolify";
+ $bunny_cdn_storage_name = "coolcdn";
$parent_dir = realpath(dirname(__FILE__) . '/../../..');
@@ -58,9 +58,11 @@ class SyncBunny extends Command
'AccessKey' => env('BUNNY_API_KEY'),
'Accept' => 'application/json',
];
- return PendingRequest::withHeaders($headers)->post('https://api.bunny.net/purge', [
- "urls" => [$url],
- ])->throw();
+ ray('Purging: ' . $url);
+ return PendingRequest::withHeaders($headers)->get('https://api.bunny.net/purge', [
+ "url" => $url,
+ "async" => false
+ ]);
});
try {
Http::pool(fn (Pool $pool) => [
@@ -70,15 +72,18 @@ class SyncBunny extends Command
$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"),
+ $pool->storage(file: "$parent_dir/$versions")->put("/$bunny_cdn_storage_name/$bunny_cdn_path/$versions"),
+ ]);
+ ray("{$bunny_cdn}/{$bunny_cdn_path}");
+ Http::pool(fn (Pool $pool) => [
+ $pool->purge("$bunny_cdn/$bunny_cdn_path/$compose_file"),
+ $pool->purge("$bunny_cdn/$bunny_cdn_path/$compose_file_prod"),
+ $pool->purge("$bunny_cdn/$bunny_cdn_path/$production_env"),
+ $pool->purge("$bunny_cdn/$bunny_cdn_path/$upgrade_script"),
+ $pool->purge("$bunny_cdn/$bunny_cdn_path/$install_script"),
+ $pool->purge("$bunny_cdn/$bunny_cdn_path/$docker_install_script"),
+ $pool->purge("$bunny_cdn/$versions"),
]);
- Http::withHeaders([
- 'AccessKey' => env('BUNNY_API_KEY'),
- 'Accept' => 'application/json',
- ])->get('https://api.bunny.net/purge', [
- "url" => "$bunny_cdn/$bunny_cdn_path/*",
- "async" => false
- ])->throw();
echo "All files uploaded & purged...\n";
} catch (\Exception $e) {
echo $e->getMessage();
diff --git a/app/Jobs/InstanceAutoUpdateJob.php b/app/Jobs/InstanceAutoUpdateJob.php
index 4a34f457b7..de32e5a165 100644
--- a/app/Jobs/InstanceAutoUpdateJob.php
+++ b/app/Jobs/InstanceAutoUpdateJob.php
@@ -42,7 +42,7 @@ class InstanceAutoUpdateJob implements ShouldQueue, ShouldBeUnique
} else {
ray('Running update on production server');
instant_remote_process([
- "curl -fsSL https://coolify-cdn.b-cdn.net/files/upgrade.sh -o /data/coolify/source/upgrade.sh",
+ "curl -fsSL https://cdn.coollabs.io/coolify/upgrade.sh -o /data/coolify/source/upgrade.sh",
"bash /data/coolify/source/upgrade.sh $this->latest_version"
], $this->server);
return;
diff --git a/bootstrap/helpers/shared.php b/bootstrap/helpers/shared.php
index d3f017aa63..89725d0bc6 100644
--- a/bootstrap/helpers/shared.php
+++ b/bootstrap/helpers/shared.php
@@ -42,7 +42,7 @@ function get_parameters()
function get_latest_version_of_coolify()
{
- $response = Http::get('https://coolify-cdn.b-cdn.net/versions.json');
+ $response = Http::get('https://cdn.coollabs.io/coolify/versions.json');
$versions = $response->json();
return data_get($versions, 'coolify.v4.version');
}
diff --git a/scripts/install.sh b/scripts/install.sh
index 3f225195fe..89660917c5 100644
--- a/scripts/install.sh
+++ b/scripts/install.sh
@@ -8,10 +8,10 @@
VERSION="1.0.0"
DOCKER_VERSION="23.0"
-CDN="https://coolify-cdn.b-cdn.net/files"
+CDN="https://cdn.coollabs.io/coolify"
OS_TYPE=$(cat /etc/os-release | grep -w "ID" | cut -d "=" -f 2 | tr -d '"')
OS_VERSION=$(cat /etc/os-release | grep -w "VERSION_ID" | cut -d "=" -f 2 | tr -d '"')
-LATEST_VERSION=$(curl --silent https://coolify-cdn.b-cdn.net/versions.json | grep -i version | sed -n '2p' | xargs | awk '{print $2}' | tr -d ',')
+LATEST_VERSION=$(curl --silent $CDN/versions.json | grep -i version | sed -n '2p' | xargs | awk '{print $2}' | tr -d ',')
if [ $EUID != 0 ]; then
echo "Please run as root"
diff --git a/scripts/upgrade.sh b/scripts/upgrade.sh
index bc4de3b571..21456b2604 100644
--- a/scripts/upgrade.sh
+++ b/scripts/upgrade.sh
@@ -6,7 +6,7 @@
###########
VERSION="1.0.0"
-CDN="https://coolify-cdn.b-cdn.net/files"
+CDN="https://cdn.coollabs.io/coolify"
curl -fsSL $CDN/docker-compose.yml -o /data/coolify/source/docker-compose.yml
curl -fsSL $CDN/docker-compose.prod.yml -o /data/coolify/source/docker-compose.prod.yml