use one constants file

This commit is contained in:
peaklabs-dev
2024-11-12 15:18:48 +01:00
parent 442b0e837c
commit 1c5ddab30d
29 changed files with 30 additions and 30 deletions

View File

@@ -13,7 +13,7 @@ class CleanupDocker
{
$settings = instanceSettings();
$helperImageVersion = data_get($settings, 'helper_version');
$helperImage = config('coolify.helper_image');
$helperImage = config('constants.coolify.helper_image');
$helperImageWithVersion = "$helperImage:$helperImageVersion";
$commands = [

View File

@@ -169,7 +169,7 @@ Files:
');
$license_key = $server->settings->logdrain_newrelic_license_key;
$base_uri = $server->settings->logdrain_newrelic_base_uri;
$base_path = config('coolify.base_config_path');
$base_path = config('constants.coolify.base_config_path');
$config_path = $base_path.'/log-drains';
$fluent_bit_config = $config_path.'/fluent-bit.conf';

View File

@@ -12,7 +12,7 @@ class Horizon extends Command
public function handle()
{
if (config('coolify.is_horizon_enabled')) {
if (config('constants.horizon.is_horizon_enabled')) {
$this->info('Horizon is enabled. Starting.');
$this->call('horizon');
exit(0);

View File

@@ -12,7 +12,7 @@ class Scheduler extends Command
public function handle()
{
if (config('coolify.is_scheduler_enabled')) {
if (config('constants.horizon.is_scheduler_enabled')) {
$this->info('Scheduler is enabled. Starting.');
$this->call('schedule:work');
exit(0);

View File

@@ -151,7 +151,7 @@ class SshMultiplexingHelper
private static function isMultiplexingEnabled(): bool
{
return config('constants.ssh.mux_enabled') && ! config('coolify.is_windows_docker_desktop');
return config('constants.ssh.mux_enabled') && ! config('constants.coolify.is_windows_docker_desktop');
}
private static function validateSshKey(string $sshKeyLocation): void

View File

@@ -147,7 +147,7 @@ class OtherController extends Controller
public function feedback(Request $request)
{
$content = $request->input('content');
$webhook_url = config('coolify.feedback_discord_webhook');
$webhook_url = config('constants.webhooks.feedback_discord_webhook');
if ($webhook_url) {
Http::post($webhook_url, [
'content' => $content,

View File

@@ -1323,7 +1323,7 @@ class ApplicationDeploymentJob implements ShouldBeEncrypted, ShouldQueue
private function prepare_builder_image()
{
$settings = instanceSettings();
$helperImage = config('coolify.helper_image');
$helperImage = config('constants.coolify.helper_image');
$helperImage = "{$helperImage}:{$settings->helper_version}";
// Get user home directory
$this->serverUserHomeDir = instant_remote_process(['echo $HOME'], $this->server);

View File

@@ -524,7 +524,7 @@ class DatabaseBackupJob implements ShouldBeEncrypted, ShouldQueue
private function getFullImageName(): string
{
$settings = instanceSettings();
$helperImage = config('coolify.helper_image');
$helperImage = config('constants.coolify.helper_image');
$latestVersion = $settings->helper_version;
return "{$helperImage}:{$latestVersion}";

View File

@@ -20,7 +20,7 @@ class PullHelperImageJob implements ShouldBeEncrypted, ShouldQueue
public function handle(): void
{
$helperImage = config('coolify.helper_image');
$helperImage = config('constants.coolify.helper_image');
$latest_version = instanceSettings()->helper_version;
instant_remote_process(["docker pull -q {$helperImage}:{$latest_version}"], $this->server, false);
}

View File

@@ -27,7 +27,7 @@ class Index extends Component
public function mount()
{
if (config('coolify.waitlist') == false) {
if (config('constants.waitlist.enabled') == false) {
return redirect()->route('register');
}
$this->waitingInLine = Waitlist::whereVerified(true)->count();

View File

@@ -462,7 +462,7 @@ $schema://$host {
public function proxyPath()
{
$base_path = config('coolify.base_config_path');
$base_path = config('constants.coolify.base_config_path');
$proxyType = $this->proxyType();
$proxy_path = "$base_path/proxy";
// TODO: should use /traefik for already exisiting configurations?

View File

@@ -1171,7 +1171,7 @@ class Service extends BaseModel
$services = get_service_templates();
$service = data_get($services, str($this->name)->beforeLast('-')->value, []);
return data_get($service, 'documentation', config('constants.docs.base_url'));
return data_get($service, 'documentation', config('constants.urls.docs'));
}
public function applications()

View File

@@ -172,7 +172,7 @@ class Team extends Model implements SendsDiscord, SendsEmail
{
return Attribute::make(
get: function () {
if (config('coolify.self_hosted') || $this->id === 0) {
if (config('constants.coolify.self_hosted') || $this->id === 0) {
$subscription = 'self-hosted';
} else {
$subscription = data_get($this, 'subscription');

View File

@@ -50,7 +50,7 @@ class FortifyServiceProvider extends ServiceProvider
if (! $settings->is_registration_enabled) {
return redirect()->route('login');
}
if (config('coolify.waitlist')) {
if (config('constants.waitlist.enabled')) {
return redirect()->route('waitlist.index');
} else {
return view('auth.register', [