update scripts
This commit is contained in:
parent
97572f158c
commit
8bfdcdbf44
@ -37,6 +37,7 @@ public function handle()
|
||||
$compose_file = "docker-compose.yml";
|
||||
$compose_file_prod = "docker-compose.prod.yml";
|
||||
$upgrade_script = "upgrade.sh";
|
||||
$docker_install_script = "install-docker.sh";
|
||||
$production_env = ".env.production";
|
||||
|
||||
PendingRequest::macro('storage', function ($file) {
|
||||
@ -53,8 +54,9 @@ public function handle()
|
||||
Http::pool(fn (Pool $pool) => [
|
||||
$pool->storage(file: "$parent_dir/$compose_file")->put("/$bunny_cdn_storage_name/$bunny_cdn_path/$compose_file"),
|
||||
$pool->storage(file: "$parent_dir/$compose_file_prod")->put("/$bunny_cdn_storage_name/$bunny_cdn_path/$compose_file_prod"),
|
||||
$pool->storage(file: "$parent_dir/scripts/$upgrade_script")->put("/$bunny_cdn_storage_name/$bunny_cdn_path/$upgrade_script"),
|
||||
$pool->storage(file: "$parent_dir/$production_env")->put("/$bunny_cdn_storage_name/$bunny_cdn_path/$production_env"),
|
||||
$pool->storage(file: "$parent_dir/scripts/$upgrade_script")->put("/$bunny_cdn_storage_name/$bunny_cdn_path/$upgrade_script"),
|
||||
$pool->storage(file: "$parent_dir/scripts/$docker_install_script")->put("/$bunny_cdn_storage_name/$bunny_cdn_path/$docker_install_script"),
|
||||
]);
|
||||
|
||||
$res = Http::withHeaders([
|
||||
@ -64,13 +66,15 @@ public function handle()
|
||||
"url" => "$bunny_cdn/$bunny_cdn_path/$compose_file",
|
||||
"url" => "$bunny_cdn/$bunny_cdn_path/$compose_file_prod",
|
||||
"url" => "$bunny_cdn/$bunny_cdn_path/$upgrade_script",
|
||||
"url" => "$bunny_cdn/$bunny_cdn_path/$production_env"
|
||||
"url" => "$bunny_cdn/$bunny_cdn_path/$production_env",
|
||||
"url" => "$bunny_cdn/$bunny_cdn_path/$docker_install_script"
|
||||
]);
|
||||
if ($res->ok()) {
|
||||
echo "All files uploaded & purged...\n";
|
||||
return;
|
||||
}
|
||||
throw new \Exception("Something went wrong.");
|
||||
} catch (\Exception $e) {
|
||||
echo "Something went wrong.\n";
|
||||
echo $e->getMessage();
|
||||
}
|
||||
}
|
||||
|
@ -2,10 +2,12 @@
|
||||
## Do not modify this file. You will lost the ability to installation and autoupdate!
|
||||
|
||||
###########
|
||||
## Always run "php artisan app:sync-to-bunny-cdn --env=secrets" if you update this file.
|
||||
## Always run "php artisan app:sync-to-bunny-cdn --env=secrets" or "scripts/run sync-bunny" if you update this file.
|
||||
###########
|
||||
|
||||
VERSION="1.0.0"
|
||||
DOCKER_VERSION="23.0"
|
||||
|
||||
CDN="https://coolify-cdn.b-cdn.net/files"
|
||||
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 '"')
|
||||
@ -18,9 +20,7 @@ fi
|
||||
|
||||
if ! [ -x "$(command -v docker)" ]; then
|
||||
echo "Docker is not installed. Installing Docker..."
|
||||
curl -fsSL https://get.docker.com -o get-docker.sh
|
||||
sh get-docker.sh
|
||||
rm get-docker.sh
|
||||
curl https://releases.rancher.com/install-docker/${DOCKER_VERSION}.sh | sh
|
||||
echo "Docker installed successfully"
|
||||
fi
|
||||
|
||||
|
@ -21,8 +21,7 @@ function help {
|
||||
compgen -A function | cat -n
|
||||
}
|
||||
function sync-bunny {
|
||||
bash vendor/bin/spin exec -u webuser coolify php artisan sync:bunny --env=secret ||
|
||||
php artisan sync:bunny --env=secrets
|
||||
php artisan sync:bunny --env=secrets
|
||||
}
|
||||
function queue {
|
||||
bash vendor/bin/spin exec -u webuser coolify php artisan queue:listen
|
||||
|
Loading…
Reference in New Issue
Block a user