use one constants file
This commit is contained in:
@@ -13,7 +13,7 @@ class CleanupDocker
|
|||||||
{
|
{
|
||||||
$settings = instanceSettings();
|
$settings = instanceSettings();
|
||||||
$helperImageVersion = data_get($settings, 'helper_version');
|
$helperImageVersion = data_get($settings, 'helper_version');
|
||||||
$helperImage = config('coolify.helper_image');
|
$helperImage = config('constants.coolify.helper_image');
|
||||||
$helperImageWithVersion = "$helperImage:$helperImageVersion";
|
$helperImageWithVersion = "$helperImage:$helperImageVersion";
|
||||||
|
|
||||||
$commands = [
|
$commands = [
|
||||||
|
@@ -169,7 +169,7 @@ Files:
|
|||||||
');
|
');
|
||||||
$license_key = $server->settings->logdrain_newrelic_license_key;
|
$license_key = $server->settings->logdrain_newrelic_license_key;
|
||||||
$base_uri = $server->settings->logdrain_newrelic_base_uri;
|
$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';
|
$config_path = $base_path.'/log-drains';
|
||||||
$fluent_bit_config = $config_path.'/fluent-bit.conf';
|
$fluent_bit_config = $config_path.'/fluent-bit.conf';
|
||||||
|
@@ -12,7 +12,7 @@ class Horizon extends Command
|
|||||||
|
|
||||||
public function handle()
|
public function handle()
|
||||||
{
|
{
|
||||||
if (config('coolify.is_horizon_enabled')) {
|
if (config('constants.horizon.is_horizon_enabled')) {
|
||||||
$this->info('Horizon is enabled. Starting.');
|
$this->info('Horizon is enabled. Starting.');
|
||||||
$this->call('horizon');
|
$this->call('horizon');
|
||||||
exit(0);
|
exit(0);
|
||||||
|
@@ -12,7 +12,7 @@ class Scheduler extends Command
|
|||||||
|
|
||||||
public function handle()
|
public function handle()
|
||||||
{
|
{
|
||||||
if (config('coolify.is_scheduler_enabled')) {
|
if (config('constants.horizon.is_scheduler_enabled')) {
|
||||||
$this->info('Scheduler is enabled. Starting.');
|
$this->info('Scheduler is enabled. Starting.');
|
||||||
$this->call('schedule:work');
|
$this->call('schedule:work');
|
||||||
exit(0);
|
exit(0);
|
||||||
|
@@ -151,7 +151,7 @@ class SshMultiplexingHelper
|
|||||||
|
|
||||||
private static function isMultiplexingEnabled(): bool
|
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
|
private static function validateSshKey(string $sshKeyLocation): void
|
||||||
|
@@ -147,7 +147,7 @@ class OtherController extends Controller
|
|||||||
public function feedback(Request $request)
|
public function feedback(Request $request)
|
||||||
{
|
{
|
||||||
$content = $request->input('content');
|
$content = $request->input('content');
|
||||||
$webhook_url = config('coolify.feedback_discord_webhook');
|
$webhook_url = config('constants.webhooks.feedback_discord_webhook');
|
||||||
if ($webhook_url) {
|
if ($webhook_url) {
|
||||||
Http::post($webhook_url, [
|
Http::post($webhook_url, [
|
||||||
'content' => $content,
|
'content' => $content,
|
||||||
|
@@ -1323,7 +1323,7 @@ class ApplicationDeploymentJob implements ShouldBeEncrypted, ShouldQueue
|
|||||||
private function prepare_builder_image()
|
private function prepare_builder_image()
|
||||||
{
|
{
|
||||||
$settings = instanceSettings();
|
$settings = instanceSettings();
|
||||||
$helperImage = config('coolify.helper_image');
|
$helperImage = config('constants.coolify.helper_image');
|
||||||
$helperImage = "{$helperImage}:{$settings->helper_version}";
|
$helperImage = "{$helperImage}:{$settings->helper_version}";
|
||||||
// Get user home directory
|
// Get user home directory
|
||||||
$this->serverUserHomeDir = instant_remote_process(['echo $HOME'], $this->server);
|
$this->serverUserHomeDir = instant_remote_process(['echo $HOME'], $this->server);
|
||||||
|
@@ -524,7 +524,7 @@ class DatabaseBackupJob implements ShouldBeEncrypted, ShouldQueue
|
|||||||
private function getFullImageName(): string
|
private function getFullImageName(): string
|
||||||
{
|
{
|
||||||
$settings = instanceSettings();
|
$settings = instanceSettings();
|
||||||
$helperImage = config('coolify.helper_image');
|
$helperImage = config('constants.coolify.helper_image');
|
||||||
$latestVersion = $settings->helper_version;
|
$latestVersion = $settings->helper_version;
|
||||||
|
|
||||||
return "{$helperImage}:{$latestVersion}";
|
return "{$helperImage}:{$latestVersion}";
|
||||||
|
@@ -20,7 +20,7 @@ class PullHelperImageJob implements ShouldBeEncrypted, ShouldQueue
|
|||||||
|
|
||||||
public function handle(): void
|
public function handle(): void
|
||||||
{
|
{
|
||||||
$helperImage = config('coolify.helper_image');
|
$helperImage = config('constants.coolify.helper_image');
|
||||||
$latest_version = instanceSettings()->helper_version;
|
$latest_version = instanceSettings()->helper_version;
|
||||||
instant_remote_process(["docker pull -q {$helperImage}:{$latest_version}"], $this->server, false);
|
instant_remote_process(["docker pull -q {$helperImage}:{$latest_version}"], $this->server, false);
|
||||||
}
|
}
|
||||||
|
@@ -27,7 +27,7 @@ class Index extends Component
|
|||||||
|
|
||||||
public function mount()
|
public function mount()
|
||||||
{
|
{
|
||||||
if (config('coolify.waitlist') == false) {
|
if (config('constants.waitlist.enabled') == false) {
|
||||||
return redirect()->route('register');
|
return redirect()->route('register');
|
||||||
}
|
}
|
||||||
$this->waitingInLine = Waitlist::whereVerified(true)->count();
|
$this->waitingInLine = Waitlist::whereVerified(true)->count();
|
||||||
|
@@ -462,7 +462,7 @@ $schema://$host {
|
|||||||
|
|
||||||
public function proxyPath()
|
public function proxyPath()
|
||||||
{
|
{
|
||||||
$base_path = config('coolify.base_config_path');
|
$base_path = config('constants.coolify.base_config_path');
|
||||||
$proxyType = $this->proxyType();
|
$proxyType = $this->proxyType();
|
||||||
$proxy_path = "$base_path/proxy";
|
$proxy_path = "$base_path/proxy";
|
||||||
// TODO: should use /traefik for already exisiting configurations?
|
// TODO: should use /traefik for already exisiting configurations?
|
||||||
|
@@ -1171,7 +1171,7 @@ class Service extends BaseModel
|
|||||||
$services = get_service_templates();
|
$services = get_service_templates();
|
||||||
$service = data_get($services, str($this->name)->beforeLast('-')->value, []);
|
$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()
|
public function applications()
|
||||||
|
@@ -172,7 +172,7 @@ class Team extends Model implements SendsDiscord, SendsEmail
|
|||||||
{
|
{
|
||||||
return Attribute::make(
|
return Attribute::make(
|
||||||
get: function () {
|
get: function () {
|
||||||
if (config('coolify.self_hosted') || $this->id === 0) {
|
if (config('constants.coolify.self_hosted') || $this->id === 0) {
|
||||||
$subscription = 'self-hosted';
|
$subscription = 'self-hosted';
|
||||||
} else {
|
} else {
|
||||||
$subscription = data_get($this, 'subscription');
|
$subscription = data_get($this, 'subscription');
|
||||||
|
@@ -50,7 +50,7 @@ class FortifyServiceProvider extends ServiceProvider
|
|||||||
if (! $settings->is_registration_enabled) {
|
if (! $settings->is_registration_enabled) {
|
||||||
return redirect()->route('login');
|
return redirect()->route('login');
|
||||||
}
|
}
|
||||||
if (config('coolify.waitlist')) {
|
if (config('constants.waitlist.enabled')) {
|
||||||
return redirect()->route('waitlist.index');
|
return redirect()->route('waitlist.index');
|
||||||
} else {
|
} else {
|
||||||
return view('auth.register', [
|
return view('auth.register', [
|
||||||
|
@@ -359,7 +359,7 @@ function isDev(): bool
|
|||||||
|
|
||||||
function isCloud(): bool
|
function isCloud(): bool
|
||||||
{
|
{
|
||||||
return ! config('coolify.self_hosted');
|
return ! config('constants.coolify.self_hosted');
|
||||||
}
|
}
|
||||||
|
|
||||||
function translate_cron_expression($expression_to_validate): string
|
function translate_cron_expression($expression_to_validate): string
|
||||||
|
@@ -100,7 +100,7 @@ class ProductionSeeder extends Seeder
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! isCloud() && config('coolify.is_windows_docker_desktop') == false) {
|
if (! isCloud() && config('constants.coolify.is_windows_docker_desktop') == false) {
|
||||||
$coolify_key_name = '@host.docker.internal';
|
$coolify_key_name = '@host.docker.internal';
|
||||||
$ssh_keys_directory = Storage::disk('ssh-keys')->files();
|
$ssh_keys_directory = Storage::disk('ssh-keys')->files();
|
||||||
$coolify_key = collect($ssh_keys_directory)->firstWhere(fn ($item) => str($item)->contains($coolify_key_name));
|
$coolify_key = collect($ssh_keys_directory)->firstWhere(fn ($item) => str($item)->contains($coolify_key_name));
|
||||||
@@ -127,7 +127,7 @@ class ProductionSeeder extends Seeder
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (config('coolify.is_windows_docker_desktop')) {
|
if (config('constants.coolify.is_windows_docker_desktop')) {
|
||||||
PrivateKey::updateOrCreate(
|
PrivateKey::updateOrCreate(
|
||||||
[
|
[
|
||||||
'id' => 0,
|
'id' => 0,
|
||||||
|
@@ -18,7 +18,7 @@
|
|||||||
@else
|
@else
|
||||||
<div>Transactional emails are not active on this instance.</div>
|
<div>Transactional emails are not active on this instance.</div>
|
||||||
<div>See how to set it in our <a class="dark:text-white" target="_blank"
|
<div>See how to set it in our <a class="dark:text-white" target="_blank"
|
||||||
href="{{ config('constants.docs.base_url') }}">docs</a>, or how to
|
href="{{ config('constants.urls.docs') }}">docs</a>, or how to
|
||||||
manually reset password.
|
manually reset password.
|
||||||
</div>
|
</div>
|
||||||
@endif
|
@endif
|
||||||
|
@@ -262,7 +262,7 @@
|
|||||||
your self-hosted instance?
|
your self-hosted instance?
|
||||||
<x-forms.button>
|
<x-forms.button>
|
||||||
<a class="font-bold dark:text-white hover:no-underline"
|
<a class="font-bold dark:text-white hover:no-underline"
|
||||||
href="{{ config('coolify.contact') }}">Contact
|
href="{{ config('constants.urls.contact') }}">Contact
|
||||||
Us</a>
|
Us</a>
|
||||||
</x-forms.button>
|
</x-forms.button>
|
||||||
</div>
|
</div>
|
||||||
|
@@ -14,7 +14,7 @@
|
|||||||
<a href="/">
|
<a href="/">
|
||||||
<x-forms.button>Go back home</x-forms.button>
|
<x-forms.button>Go back home</x-forms.button>
|
||||||
</a>
|
</a>
|
||||||
<a target="_blank" class="text-xs" href="{{ config('coolify.contact') }}">Contact
|
<a target="_blank" class="text-xs" href="{{ config('constants.urls.contact') }}">Contact
|
||||||
support
|
support
|
||||||
<x-external-link />
|
<x-external-link />
|
||||||
</a>
|
</a>
|
||||||
|
@@ -9,7 +9,7 @@
|
|||||||
<a href="/">
|
<a href="/">
|
||||||
<x-forms.button>Go back home</x-forms.button>
|
<x-forms.button>Go back home</x-forms.button>
|
||||||
</a>
|
</a>
|
||||||
<a target="_blank" class="text-xs" href="{{ config('coolify.contact') }}">Contact
|
<a target="_blank" class="text-xs" href="{{ config('constants.urls.contact') }}">Contact
|
||||||
support
|
support
|
||||||
<x-external-link />
|
<x-external-link />
|
||||||
</a>
|
</a>
|
||||||
|
@@ -8,7 +8,7 @@
|
|||||||
<a href="/">
|
<a href="/">
|
||||||
<x-forms.button>Go back home</x-forms.button>
|
<x-forms.button>Go back home</x-forms.button>
|
||||||
</a>
|
</a>
|
||||||
<a target="_blank" class="text-xs" href="{{ config('coolify.contact') }}">Contact
|
<a target="_blank" class="text-xs" href="{{ config('constants.urls.contact') }}">Contact
|
||||||
support
|
support
|
||||||
<x-external-link />
|
<x-external-link />
|
||||||
</a>
|
</a>
|
||||||
|
@@ -9,7 +9,7 @@
|
|||||||
<a href="/">
|
<a href="/">
|
||||||
<x-forms.button>Go back home</x-forms.button>
|
<x-forms.button>Go back home</x-forms.button>
|
||||||
</a>
|
</a>
|
||||||
<a target="_blank" class="text-xs" href="{{ config('coolify.contact') }}">Contact
|
<a target="_blank" class="text-xs" href="{{ config('constants.urls.contact') }}">Contact
|
||||||
support
|
support
|
||||||
<x-external-link />
|
<x-external-link />
|
||||||
</a>
|
</a>
|
||||||
|
@@ -10,7 +10,7 @@
|
|||||||
<a href="/">
|
<a href="/">
|
||||||
<x-forms.button>Go back home</x-forms.button>
|
<x-forms.button>Go back home</x-forms.button>
|
||||||
</a>
|
</a>
|
||||||
<a target="_blank" class="text-xs" href="{{ config('coolify.contact') }}">Contact
|
<a target="_blank" class="text-xs" href="{{ config('constants.urls.contact') }}">Contact
|
||||||
support
|
support
|
||||||
<x-external-link />
|
<x-external-link />
|
||||||
</a>
|
</a>
|
||||||
|
@@ -10,7 +10,7 @@
|
|||||||
<a href="/">
|
<a href="/">
|
||||||
<x-forms.button>Go back home</x-forms.button>
|
<x-forms.button>Go back home</x-forms.button>
|
||||||
</a>
|
</a>
|
||||||
<a target="_blank" class="text-xs" href="{{ config('coolify.contact') }}">Contact
|
<a target="_blank" class="text-xs" href="{{ config('constants.urls.contact') }}">Contact
|
||||||
support
|
support
|
||||||
<x-external-link />
|
<x-external-link />
|
||||||
</a>
|
</a>
|
||||||
|
@@ -10,7 +10,7 @@
|
|||||||
<a href="/">
|
<a href="/">
|
||||||
<x-forms.button>Go back home</x-forms.button>
|
<x-forms.button>Go back home</x-forms.button>
|
||||||
</a>
|
</a>
|
||||||
<a target="_blank" class="text-xs" href="{{ config('coolify.contact') }}">Contact
|
<a target="_blank" class="text-xs" href="{{ config('constants.urls.contact') }}">Contact
|
||||||
support
|
support
|
||||||
<x-external-link />
|
<x-external-link />
|
||||||
</a>
|
</a>
|
||||||
|
@@ -13,7 +13,7 @@
|
|||||||
<a href="/">
|
<a href="/">
|
||||||
<x-forms.button>Go back home</x-forms.button>
|
<x-forms.button>Go back home</x-forms.button>
|
||||||
</a>
|
</a>
|
||||||
<a target="_blank" class="text-xs" href="{{ config('coolify.contact') }}">Contact
|
<a target="_blank" class="text-xs" href="{{ config('constants.urls.contact') }}">Contact
|
||||||
support
|
support
|
||||||
<x-external-link />
|
<x-external-link />
|
||||||
</a>
|
</a>
|
||||||
|
@@ -7,7 +7,7 @@
|
|||||||
patience.
|
patience.
|
||||||
</p>
|
</p>
|
||||||
<div class="flex items-center mt-10 gap-x-6">
|
<div class="flex items-center mt-10 gap-x-6">
|
||||||
<a target="_blank" class="text-xs" href="{{ config('coolify.contact') }}">Contact
|
<a target="_blank" class="text-xs" href="{{ config('constants.urls.contact') }}">Contact
|
||||||
support
|
support
|
||||||
<x-external-link />
|
<x-external-link />
|
||||||
</a>
|
</a>
|
||||||
|
@@ -254,7 +254,7 @@
|
|||||||
const name = @js($name);
|
const name = @js($name);
|
||||||
const isDev = @js(config('app.env')) ===
|
const isDev = @js(config('app.env')) ===
|
||||||
'local';
|
'local';
|
||||||
const devWebhook = @js(config('coolify.dev_webhook'));
|
const devWebhook = @js(config('constants.webhooks.dev_webhook'));
|
||||||
if (isDev && devWebhook) {
|
if (isDev && devWebhook) {
|
||||||
baseUrl = devWebhook;
|
baseUrl = devWebhook;
|
||||||
}
|
}
|
||||||
|
@@ -45,7 +45,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="pt-4">
|
<div class="pt-4">
|
||||||
If you have any problems, please <a class="underline dark:text-white" href="{{ config('coolify.contact') }}"
|
If you have any problems, please <a class="underline dark:text-white" href="{{ config('constants.urls.contact') }}"
|
||||||
target="_blank">contact us.</a>
|
target="_blank">contact us.</a>
|
||||||
</div>
|
</div>
|
||||||
@endif
|
@endif
|
||||||
|
Reference in New Issue
Block a user