diff --git a/CHANGELOG.md b/CHANGELOG.md index aaeaaa56f..dfb599f7b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -62,9 +62,11 @@ All notable changes to this project will be documented in this file. ### Refactored -- Completely refactor all database migrations for a cleaner, more consistent and stable database schema -- Completely refactor all database models +- All database migrations for a cleaner, more consistent and stable database schema +- All database models for improved maintainability - Replace hardcoded queue strings with a `ProcessingQueue` enum +- `config/constants.php` to `config/coolify.php` for all Coolify-specific settings +- Environment variable naming to be shorter and more consistent ### Maintenance diff --git a/config/app.php b/config/app.php index 017fce78e..938c995b8 100644 --- a/config/app.php +++ b/config/app.php @@ -55,6 +55,21 @@ return [ 'url' => env('APP_URL', 'http://localhost'), + /* + |-------------------------------------------------------------------------- + | Coolify Application Options + |-------------------------------------------------------------------------- + | + | These are custom configuration options specific to Coolify. They allow + | you to configure the application port and whether HTTPS should be + | forced for all requests to the application. + | + */ + + 'port' => env('APP_PORT', 8000), + + 'force_https' => env('APP_FORCE_HTTPS', false), + /* |-------------------------------------------------------------------------- | Application Timezone diff --git a/config/coolify.php b/config/coolify.php new file mode 100644 index 000000000..49531db51 --- /dev/null +++ b/config/coolify.php @@ -0,0 +1,27 @@ + '5.0.0-alpha.1', + 'helper_version' => '2.0.0', + 'self_hosted' => env('SELF_HOSTED', true), + 'autoupdate' => env('AUTOUPDATE_ENABLED', false), + 'cdn_url' => env('CDN_URL', 'https://cdn.coollabs.io/v5.x'), + + 'migrations' => [ + 'enabled' => env('MIGRATIONS_ENABLED', true), + ], + + 'seeders' => [ + 'enabled' => env('SEEDERS_ENABLED', true), + ], + + 'scheduler' => [ + 'enabled' => env('SCHEDULER_ENABLED', true), + ], + + 'horizon' => [ + 'enabled' => env('HORIZON_ENABLED', true), + ], +]; diff --git a/config/horizon.php b/config/horizon.php index 0090d8ae1..cc75f6a84 100644 --- a/config/horizon.php +++ b/config/horizon.php @@ -192,7 +192,7 @@ return [ */ 'defaults' => [ - ...((bool) env('IS_WORKER_SERVER', false) ? [] : [ + ...((bool) env('WORKER_SERVER', false) ? [] : [ 'jobs' => [ 'connection' => 'redis', 'queue' => ['high', 'default'], @@ -220,7 +220,7 @@ return [ 'workers-name' => 'deployments', ], ]), - ...((bool) env('IS_WORKER_SERVER', false) ? [ + ...((bool) env('WORKER_SERVER', false) ? [ 'worker-jobs' => [ 'connection' => 'redis', 'queue' => ['worker-high', 'worker-default'], @@ -252,7 +252,7 @@ return [ 'environments' => [ '*' => [ - ...((bool) env('IS_WORKER_SERVER', false) ? [] : [ + ...((bool) env('WORKER_SERVER', false) ? [] : [ 'jobs' => [ 'minProcesses' => env('HORIZON_JOBS_MIN_PROCESSES', 1), 'maxProcesses' => env('HORIZON_JOBS_MAX_PROCESSES', 4), @@ -266,7 +266,7 @@ return [ 'balanceCooldown' => env('HORIZON_DEPLOYMENTS_BALANCE_COOLDOWN', 2), ], ]), - ...((bool) env('IS_WORKER_SERVER', false) ? [ + ...((bool) env('WORKER_SERVER', false) ? [ 'worker-jobs' => [ 'minProcesses' => env('HORIZON_JOBS_MIN_PROCESSES', 1), 'maxProcesses' => env('HORIZON_JOBS_MAX_PROCESSES', 6),