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.
PHP coolifydatabasesdeploymentdockerdocker-composeinertiajslaravelmariadbmysqlnextjsnodejsphppostgresredisself-hostedself-hostingserverstatic-sitesveltesvelte5
chore: Update Coolify version to 4.0.0-beta.324 and fix file paths in upgrade script
Andras Bacsaic6df243623f0
diff --git a/app/Console/Commands/SyncBunny.php b/app/Console/Commands/SyncBunny.phpindex 7135cfc9cf..228467f885 100644--- a/app/Console/Commands/SyncBunny.php+++ b/app/Console/Commands/SyncBunny.php@@ -16,7 +16,7 @@ class SyncBunny extends Command** @var string*/- protected $signature = 'sync:bunny {--templates} {--release}';+ protected $signature = 'sync:bunny {--templates} {--release} {--nightly}';/*** The console command description.@@ -33,6 +33,7 @@ class SyncBunny extends Command$that = $this;$only_template = $this->option('templates');$only_version = $this->option('release');+ $nightly = $this->option('nightly');$bunny_cdn = 'https://cdn.coollabs.io';$bunny_cdn_path = 'coolify';$bunny_cdn_storage_name = 'coolcdn';@@ -45,9 +46,15 @@ class SyncBunny extends Command$upgrade_script = 'upgrade.sh';$production_env = '.env.production';$service_template = 'service-templates.json';-$versions = 'versions.json';+ $compose_file_location = "$parent_dir/$compose_file";+ $compose_file_prod_location = "$parent_dir/$compose_file_prod";+ $install_script_location = "$parent_dir/scripts/install.sh";+ $upgrade_script_location = "$parent_dir/scripts/upgrade.sh";+ $production_env_location = "$parent_dir/.env.production";+ $versions_location = "$parent_dir/$versions";+PendingRequest::macro('storage', function ($fileName) use ($that) {$headers = ['AccessKey' => env('BUNNY_STORAGE_API_KEY'),@@ -73,8 +80,26 @@ class SyncBunny extends Command]);});try {+ if ($nightly) {+ $bunny_cdn_path = 'coolify-nightly';++ $compose_file_location = "$parent_dir/other/nightly/$compose_file";+ $compose_file_prod_location = "$parent_dir/other/nightly/$compose_file_prod";+ $production_env_location = "$parent_dir/other/nightly/$production_env";+ $upgrade_script_location = "$parent_dir/other/nightly/$upgrade_script";+ $install_script_location = "$parent_dir/other/nightly/$install_script";+ $versions_location = "$parent_dir/other/nightly/$versions";+ }if (! $only_template && ! $only_version) {- $this->info('About to sync files (docker-compose.prod.yaml, upgrade.sh, install.sh, etc) to BunnyCDN.');+ if ($nightly) {+ $this->info('About to sync files NIGHTLY (docker-compose.prod.yaml, upgrade.sh, install.sh, etc) to BunnyCDN.');+ } else {+ $this->info('About to sync files PRODUCTION (docker-compose.yml, docker-compose.prod.yml, upgrade.sh, install.sh, etc) to BunnyCDN.');+ }+ $confirmed = confirm('Are you sure you want to sync?');+ if (! $confirmed) {+ return;+ }}if ($only_template) {$this->info('About to sync service-templates.json to BunnyCDN.');@@ -90,8 +115,12 @@ class SyncBunny extends Commandreturn;} elseif ($only_version) {- $this->info('About to sync versions.json to BunnyCDN.');- $file = file_get_contents("$parent_dir/$versions");+ if ($nightly) {+ $this->info('About to sync NIGHLTY versions.json to BunnyCDN.');+ } else {+ $this->info('About to sync PRODUCTION versions.json to BunnyCDN.');+ }+ $file = file_get_contents($versions_location);$json = json_decode($file, true);$actual_version = data_get($json, 'coolify.v4.version');@@ -100,7 +129,7 @@ class SyncBunny extends Commandreturn;}Http::pool(fn (Pool $pool) => [- $pool->storage(fileName: "$parent_dir/$versions")->put("/$bunny_cdn_storage_name/$bunny_cdn_path/$versions"),+ $pool->storage(fileName: $versions_location)->put("/$bunny_cdn_storage_name/$bunny_cdn_path/$versions"),$pool->purge("$bunny_cdn/$bunny_cdn_path/$versions"),]);$this->info('versions.json uploaded & purged...');@@ -109,11 +138,11 @@ class SyncBunny extends Command}Http::pool(fn (Pool $pool) => [- $pool->storage(fileName: "$parent_dir/$compose_file")->put("/$bunny_cdn_storage_name/$bunny_cdn_path/$compose_file"),- $pool->storage(fileName: "$parent_dir/$compose_file_prod")->put("/$bunny_cdn_storage_name/$bunny_cdn_path/$compose_file_prod"),- $pool->storage(fileName: "$parent_dir/$production_env")->put("/$bunny_cdn_storage_name/$bunny_cdn_path/$production_env"),- $pool->storage(fileName: "$parent_dir/scripts/$upgrade_script")->put("/$bunny_cdn_storage_name/$bunny_cdn_path/$upgrade_script"),- $pool->storage(fileName: "$parent_dir/scripts/$install_script")->put("/$bunny_cdn_storage_name/$bunny_cdn_path/$install_script"),+ $pool->storage(fileName: "$compose_file_location")->put("/$bunny_cdn_storage_name/$bunny_cdn_path/$compose_file"),+ $pool->storage(fileName: "$compose_file_prod_location")->put("/$bunny_cdn_storage_name/$bunny_cdn_path/$compose_file_prod"),+ $pool->storage(fileName: "$production_env_location")->put("/$bunny_cdn_storage_name/$bunny_cdn_path/$production_env"),+ $pool->storage(fileName: "$upgrade_script_location")->put("/$bunny_cdn_storage_name/$bunny_cdn_path/$upgrade_script"),+ $pool->storage(fileName: "$install_script_location")->put("/$bunny_cdn_storage_name/$bunny_cdn_path/$install_script"),]);Http::pool(fn (Pool $pool) => [$pool->purge("$bunny_cdn/$bunny_cdn_path/$compose_file"),diff --git a/config/database.php b/config/database.phpindex 248c6150a8..f48a680828 100644--- a/config/database.php+++ b/config/database.php@@ -35,34 +35,6 @@ return ['connections' => [- 'sqlite' => [- 'driver' => 'sqlite',- 'url' => env('DATABASE_URL'),- 'database' => env('DB_DATABASE', database_path('database.sqlite')),- 'prefix' => '',- 'foreign_key_constraints' => env('DB_FOREIGN_KEYS', true),- ],-- 'mysql' => [- 'driver' => 'mysql',- 'url' => env('DATABASE_URL'),- 'host' => env('DB_HOST', '127.0.0.1'),- 'port' => env('DB_PORT', '3306'),- 'database' => env('DB_DATABASE', 'forge'),- 'username' => env('DB_USERNAME', 'forge'),- 'password' => env('DB_PASSWORD', ''),- 'unix_socket' => env('DB_SOCKET', ''),- 'charset' => 'utf8mb4',- 'collation' => 'utf8mb4_unicode_ci',- 'prefix' => '',- 'prefix_indexes' => true,- 'strict' => true,- 'engine' => null,- 'options' => extension_loaded('pdo_mysql') ? array_filter([- PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'),- ]) : [],- ],-'pgsql' => ['driver' => 'pgsql','url' => env('DATABASE_URL'),@@ -77,22 +49,6 @@ return ['search_path' => 'public','sslmode' => 'prefer',],-- 'sqlsrv' => [- 'driver' => 'sqlsrv',- 'url' => env('DATABASE_URL'),- 'host' => env('DB_HOST', 'localhost'),- 'port' => env('DB_PORT', '1433'),- 'database' => env('DB_DATABASE', 'forge'),- 'username' => env('DB_USERNAME', 'forge'),- 'password' => env('DB_PASSWORD', ''),- 'charset' => 'utf8',- 'prefix' => '',- 'prefix_indexes' => true,- // 'encrypt' => env('DB_ENCRYPT', 'yes'),- // 'trust_server_certificate' => env('DB_TRUST_SERVER_CERTIFICATE', 'false'),- ],-],/*diff --git a/other/newcompose/.env.development.example b/other/nightly/.env.development.examplesimilarity index 100%rename from other/newcompose/.env.development.examplerename to other/nightly/.env.development.examplediff --git a/other/newcompose/.env.production b/other/nightly/.env.productionsimilarity index 84%rename from other/newcompose/.env.productionrename to other/nightly/.env.productionindex 8e5dd46026..099ec7c250 100644--- a/other/newcompose/.env.production+++ b/other/nightly/.env.production@@ -1,10 +1,10 @@# Coolify ConfigurationAPP_ID=+APP_NAME=CoolifyAPP_KEY=# PostgreSQL Database Configuration-DB_DATABASE=coolify-DB_USERNAME=+DB_USERNAME=coolifyDB_PASSWORD=# Redis Configurationdiff --git a/other/newcompose/docker-compose.prod.yml b/other/nightly/docker-compose.prod.ymlsimilarity index 95%rename from other/newcompose/docker-compose.prod.ymlrename to other/nightly/docker-compose.prod.ymlindex e8d404eafa..b26cd57467 100644--- a/other/newcompose/docker-compose.prod.yml+++ b/other/nightly/docker-compose.prod.yml@@ -14,7 +14,7 @@ services:- /data/coolify/webhooks-during-maintenance:/var/www/html/storage/app/webhooks-during-maintenanceenvironment:- APP_ENV=production- - APP_NAME=Coolify+ - APP_NAME- APP_ID- APP_KEY- APP_URL@@ -93,13 +93,7 @@ services:POSTGRES_PASSWORD: "${DB_PASSWORD}"POSTGRES_DB: "${DB_DATABASE:-coolify}"healthcheck:- test:- [- "CMD-SHELL",- "pg_isready -U ${DB_USERNAME}",- "-d",- "${DB_DATABASE:-coolify}"- ]+ test: [ "CMD-SHELL", "pg_isready -U ${DB_USERNAME}", "-d", "${DB_DATABASE:-coolify}" ]interval: 5sretries: 10timeout: 2s@@ -132,3 +126,7 @@ volumes:name: coolify-dbcoolify-redis:name: coolify-redis++networks:+ coolify:+ external: truediff --git a/other/newcompose/docker-compose.windows.yml b/other/nightly/docker-compose.windows.ymlsimilarity index 100%rename from other/newcompose/docker-compose.windows.ymlrename to other/nightly/docker-compose.windows.ymldiff --git a/other/newcompose/docker-compose.yml b/other/nightly/docker-compose.ymlsimilarity index 100%rename from other/newcompose/docker-compose.ymlrename to other/nightly/docker-compose.ymldiff --git a/other/newcompose/install.sh b/other/nightly/install.shsimilarity index 97%rename from other/newcompose/install.shrename to other/nightly/install.shindex b08b0bffce..01fdcbc410 100755--- a/other/newcompose/install.sh+++ b/other/nightly/install.sh@@ -9,7 +9,7 @@ set -o pipefail # Cause a pipeline to return the status of the last command thatVERSION="1.3.4"DOCKER_VERSION="26.0"-CDN="https://cdn.coollabs.io/coolify"+CDN="https://cdn.coollabs.io/coolify-nightly"OS_TYPE=$(grep -w "ID" /etc/os-release | cut -d "=" -f 2 | tr -d '"')ENV_FILE="/data/coolify/source/.env"@@ -70,7 +70,7 @@ fiecho -e "-------------"echo -e "Welcome to Coolify v4 beta installer!"echo -e "This script will install everything for you."-echo -e "(Source code: https://github.com/coollabsio/coolify/blob/main/scripts/install.sh )\n"+echo -e "Source code: https://github.com/coollabsio/coolify/blob/main/scripts/install.sh\n"echo -e "-------------"echo "OS: $OS_TYPE $OS_VERSION"@@ -296,7 +296,8 @@ if [ ! -f $ENV_FILE ]; thensed -i "s|^APP_KEY=.*|APP_KEY=base64:$(openssl rand -base64 32)|" "$ENV_FILE"# Generate a secure Postgres DB username and password- sed -i "s|^DB_USERNAME=.*|DB_USERNAME=$(openssl rand -hex 16)|" "$ENV_FILE"+ # Causes issues: database "random-user" does not exist+ # sed -i "s|^DB_USERNAME=.*|DB_USERNAME=$(openssl rand -hex 16)|" "$ENV_FILE"sed -i "s|^DB_PASSWORD=.*|DB_PASSWORD=$(openssl rand -base64 32)|" "$ENV_FILE"# Generate a secure Redis passworddiff --git a/other/newcompose/upgrade.sh b/other/nightly/upgrade.shsimilarity index 95%rename from other/newcompose/upgrade.shrename to other/nightly/upgrade.shindex f661256486..775cd3f814 100644--- a/other/newcompose/upgrade.sh+++ b/other/nightly/upgrade.sh@@ -2,7 +2,7 @@## Do not modify this file. You will lose the ability to autoupdate!VERSION="1.0.6"-CDN="https://cdn.coollabs.io/coolify"+CDN="https://cdn.coollabs.io/coolify-nightly"curl -fsSL $CDN/docker-compose.yml -o /data/coolify/source/docker-compose.ymlcurl -fsSL $CDN/docker-compose.prod.yml -o /data/coolify/source/docker-compose.prod.yml@@ -26,7 +26,7 @@ fi# Make sure coolify network exists# It is created when starting Coolify with docker compose-# docker network create --attachable coolify 2>/dev/null+docker network create --attachable coolify 2>/dev/null# docker network create --attachable --driver=overlay coolify-overlay 2>/dev/nullif [ -f /data/coolify/source/docker-compose.custom.yml ]; thendiff --git a/other/nightly/versions.json b/other/nightly/versions.jsonnew file mode 100644index 0000000000..9ad8863086--- /dev/null+++ b/other/nightly/versions.json@@ -0,0 +1,10 @@+{+ "coolify": {+ "v4": {+ "version": "4.0.0-beta.324"+ },+ "nightly": {+ "version": "4.0.0-beta.324"+ }+ }+}\ No newline at end of filediff --git a/other/scripts/get-subs.php b/other/scripts/get-subs.phpdeleted file mode 100644index 3a23fc0732..0000000000--- a/other/scripts/get-subs.php+++ /dev/null@@ -1,11 +0,0 @@-$handle = fopen("/tmp/export.csv", "w");-App\Models\Team::chunk(100, function ($teams) use ($handle) {- foreach ($teams as $team) {- if ($team->subscription->stripe_invoice_paid == true) {- foreach ($team->members as $member) {- fputcsv($handle, [$member->email, $member->name], ",");- }- }- }-});-fclose($handle);diff --git a/versions.json b/versions.jsonindex a256c76084..33db3c8fae 100644--- a/versions.json+++ b/versions.json@@ -1,7 +1,10 @@{"coolify": {"v4": {+ "version": "4.0.0-beta.323"+ },+ "nightly": {"version": "4.0.0-beta.324"}}-}+}\ No newline at end of file