From ecd98bfcd5c99b489ed5328310b527cd2c89838c Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Fri, 13 Sep 2024 13:13:23 +0200 Subject: [PATCH] chore: Update APP_NAME environment variable in docker-compose.prod.yml --- other/nightly/docker-compose.prod.yml | 1 + resources/views/livewire/project/shared/terminal.blade.php | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/other/nightly/docker-compose.prod.yml b/other/nightly/docker-compose.prod.yml index ffcfadead..7f019790b 100644 --- a/other/nightly/docker-compose.prod.yml +++ b/other/nightly/docker-compose.prod.yml @@ -117,6 +117,7 @@ services: volumes: - ./storage:/var/www/html/storage environment: + APP_NAME: "${APP_NAME:-Coolify}" SOKETI_DEBUG: "${SOKETI_DEBUG:-false}" SOKETI_DEFAULT_APP_ID: "${PUSHER_APP_ID}" SOKETI_DEFAULT_APP_KEY: "${PUSHER_APP_KEY}" diff --git a/resources/views/livewire/project/shared/terminal.blade.php b/resources/views/livewire/project/shared/terminal.blade.php index 56bc6e183..9fa6bbfb7 100644 --- a/resources/views/livewire/project/shared/terminal.blade.php +++ b/resources/views/livewire/project/shared/terminal.blade.php @@ -34,12 +34,13 @@ function initializeWebSocket() { if (!socket || socket.readyState === WebSocket.CLOSED) { - let url = "{{ str_replace(['http://', 'https://'], '', config('app.url')) }}" || window.location.hostname; + let url = window.location.hostname; // make sure the port is not included url = url.split(':')[0]; socket = new WebSocket((window.location.protocol === 'https:' ? 'wss://' : 'ws://') + url + ':6002/terminal'); + socket.onmessage = handleSocketMessage; socket.onerror = (e) => { console.error('WebSocket error:', e);