use config instead of env()

This commit is contained in:
peaklabs-dev
2024-11-12 15:53:05 +01:00
parent 97f868a285
commit 1ffa88acf0
9 changed files with 37 additions and 31 deletions

View File

@@ -84,9 +84,9 @@
window.Pusher = Pusher;
window.Echo = new Echo({
broadcaster: 'pusher',
cluster: "{{ env('PUSHER_HOST') }}" || window.location.hostname,
key: "{{ env('PUSHER_APP_KEY') }}" || 'coolify',
wsHost: "{{ env('PUSHER_HOST') }}" || window.location.hostname,
cluster: "{{ config('constants.pusher.host') }}" || window.location.hostname,
key: "{{ config('constants.pusher.app_key') }}" || 'coolify',
wsHost: "{{ config('constants.pusher.host') }}" || window.location.hostname,
wsPort: "{{ getRealtime() }}",
wssPort: "{{ getRealtime() }}",
forceTLS: false,

View File

@@ -26,9 +26,9 @@
<script>
// expose terminal config to the terminal.js file
window.terminalConfig = {
protocol: "{{ env('TERMINAL_PROTOCOL') }}",
host: "{{ env('TERMINAL_HOST') }}",
port: "{{ env('TERMINAL_PORT') }}"
protocol: "{{ config('constants.terminal.protocol') }}",
host: "{{ config('constants.terminal.host') }}",
port: "{{ config('constants.terminal.port') }}"
}
</script>
@endscript

View File

@@ -102,7 +102,7 @@
placeholder="1.1.1.1,8.8.8.8" />
<h4 class="pt-6">Update</h4>
<div class="text-right md:w-96">
@if (!is_null(env('AUTOUPDATE', null)))
@if (!is_null(config('constants.coolify.autoupdate', null)))
<div class="text-right md:w-96">
<x-forms.checkbox instantSave helper="AUTOUPDATE is set in .env file, you need to modify it there."
disabled id="is_auto_update_enabled" label="Enabled" />
@@ -119,7 +119,7 @@
<x-forms.button wire:click='checkManually'>Check Manually</x-forms.button>
</div>
@if (is_null(env('AUTOUPDATE', null)) && $is_auto_update_enabled)
@if (is_null(config('constants.coolify.autoupdate', null)) && $is_auto_update_enabled)
<x-forms.input required id="auto_update_frequency" label="Auto Update Frequency" placeholder="0 0 * * *"
helper="Cron expression for auto update frequency (automatically update coolify).<br>You can use every_minute, hourly, daily, weekly, monthly, yearly.<br><br>Default is every day at 00:00" />
@endif