An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.
PHP coolifydatabasesdeploymentdockerdocker-composeinertiajslaravelmariadbmysqlnextjsnodejsphppostgresredisself-hostedself-hostingserverstatic-sitesveltesvelte5
fix(reverb): separate public Soketi port from internal Reverb port
Andras Bacsai3ce4209a2fdc
diff --git a/.env.windows-docker-desktop.example b/.env.windows-docker-desktop.exampleindex 08c5dfda7f..e97249505d 100644--- a/.env.windows-docker-desktop.example+++ b/.env.windows-docker-desktop.example@@ -11,5 +11,4 @@ REDIS_PASSWORD=coolifyPUSHER_APP_ID=coolifyPUSHER_APP_KEY=coolifyPUSHER_APP_SECRET=coolify-PUSHER_PORT=6001PUSHER_BACKEND_PORT=6001diff --git a/docker-compose.prod.yml b/docker-compose.prod.ymlindex b9bf07a9ed..169a65393a 100644--- a/docker-compose.prod.yml+++ b/docker-compose.prod.yml@@ -25,11 +25,11 @@ services:- /data/coolify/source/.envports:- "${APP_PORT:-8000}:8080"- - "${PUSHER_PORT:-6001}:6001"+ - "${SOKETI_PORT:-6001}:6001"- "${TERMINAL_PORT:-6002}:6002"expose:- "${APP_PORT:-8000}"- - "${PUSHER_PORT:-6001}"+ - "6001"- "${TERMINAL_PORT:-6002}"healthcheck:test: curl --fail http://127.0.0.1:8080/api/health || exit 1diff --git a/docker-compose.windows.yml b/docker-compose.windows.ymlindex 3962b2b078..499584c14d 100644--- a/docker-compose.windows.yml+++ b/docker-compose.windows.yml@@ -51,11 +51,11 @@ services:- IS_WINDOWS_DOCKER_DESKTOP=trueports:- "${APP_PORT:-8000}:8080"- - "${PUSHER_PORT:-6001}:6001"+ - "${SOKETI_PORT:-6001}:6001"- "${TERMINAL_PORT:-6002}:6002"expose:- "${APP_PORT:-8000}"- - "${PUSHER_PORT:-6001}"+ - "6001"- "${TERMINAL_PORT:-6002}"healthcheck:test: curl --fail http://localhost:8080/api/health || exit 1diff --git a/other/nightly/.env.production b/other/nightly/.env.productionindex 9bbdc07bce..f872a214f9 100644--- a/other/nightly/.env.production+++ b/other/nightly/.env.production@@ -10,7 +10,6 @@ REDIS_PASSWORD=PUSHER_APP_ID=PUSHER_APP_KEY=PUSHER_APP_SECRET=-PUSHER_PORT=6001PUSHER_BACKEND_PORT=6001ROOT_USERNAME=diff --git a/other/nightly/docker-compose.prod.yml b/other/nightly/docker-compose.prod.ymlindex b9bf07a9ed..169a65393a 100644--- a/other/nightly/docker-compose.prod.yml+++ b/other/nightly/docker-compose.prod.yml@@ -25,11 +25,11 @@ services:- /data/coolify/source/.envports:- "${APP_PORT:-8000}:8080"- - "${PUSHER_PORT:-6001}:6001"+ - "${SOKETI_PORT:-6001}:6001"- "${TERMINAL_PORT:-6002}:6002"expose:- "${APP_PORT:-8000}"- - "${PUSHER_PORT:-6001}"+ - "6001"- "${TERMINAL_PORT:-6002}"healthcheck:test: curl --fail http://127.0.0.1:8080/api/health || exit 1diff --git a/other/nightly/docker-compose.windows.yml b/other/nightly/docker-compose.windows.ymlindex 47d7f2d7de..302c89c27f 100644--- a/other/nightly/docker-compose.windows.yml+++ b/other/nightly/docker-compose.windows.yml@@ -50,11 +50,11 @@ services:- IS_WINDOWS_DOCKER_DESKTOP=trueports:- "${APP_PORT:-8000}:8080"- - "${PUSHER_PORT:-6001}:6001"+ - "${SOKETI_PORT:-6001}:6001"- "${TERMINAL_PORT:-6002}:6002"expose:- "${APP_PORT:-8000}"- - "${PUSHER_PORT:-6001}"+ - "6001"- "${TERMINAL_PORT:-6002}"healthcheck:test: curl --fail http://localhost:8080/api/health || exit 1diff --git a/other/nightly/install.sh b/other/nightly/install.shindex 82a243a5f7..7d5f868dc8 100755--- a/other/nightly/install.sh+++ b/other/nightly/install.sh@@ -832,13 +832,6 @@ update_env_var() {fi}-normalize_pusher_port() {- if grep -q "^PUSHER_PORT=8080$" "$ENV_FILE"; then- sed -i "s|^PUSHER_PORT=8080$|PUSHER_PORT=6001|" "$ENV_FILE"- echo " - Updated PUSHER_PORT from app HTTP port 8080 to Reverb port 6001"- fi-}-update_env_var "APP_ID" "$(openssl rand -hex 16)"update_env_var "APP_KEY" "base64:$(openssl rand -base64 32)"# update_env_var "DB_USERNAME" "$(openssl rand -hex 16)" # Causes issues: database "random-user" does not exist@@ -847,8 +840,6 @@ update_env_var "REDIS_PASSWORD" "$(openssl rand -base64 32)"update_env_var "PUSHER_APP_ID" "$(openssl rand -hex 32)"update_env_var "PUSHER_APP_KEY" "$(openssl rand -hex 32)"update_env_var "PUSHER_APP_SECRET" "$(openssl rand -hex 32)"-update_env_var "PUSHER_PORT" "6001"-normalize_pusher_portupdate_env_var "PUSHER_BACKEND_PORT" "6001"# Add default root user credentials from environment variablesdiff --git a/other/nightly/upgrade.sh b/other/nightly/upgrade.shindex 9487125cc4..0e441ad380 100644--- a/other/nightly/upgrade.sh+++ b/other/nightly/upgrade.sh@@ -133,13 +133,6 @@ update_env_var() {fi}-normalize_pusher_port() {- if grep -q "^PUSHER_PORT=8080$" "$ENV_FILE"; then- sed -i "s|^PUSHER_PORT=8080$|PUSHER_PORT=6001|" "$ENV_FILE"- log "Updated PUSHER_PORT from app HTTP port 8080 to Reverb port 6001"- fi-}-set_env_var() {local key="$1"local value="$2"@@ -158,8 +151,6 @@ set_env_var "REGISTRY_URL" "$REGISTRY_URL"update_env_var "PUSHER_APP_ID" "$(openssl rand -hex 32)"update_env_var "PUSHER_APP_KEY" "$(openssl rand -hex 32)"update_env_var "PUSHER_APP_SECRET" "$(openssl rand -hex 32)"-update_env_var "PUSHER_PORT" "6001"-normalize_pusher_portupdate_env_var "PUSHER_BACKEND_PORT" "6001"log "Environment variables check complete"echo " Done."diff --git a/scripts/install.sh b/scripts/install.shindex c49e313614..e2060b34d9 100755--- a/scripts/install.sh+++ b/scripts/install.sh@@ -833,13 +833,6 @@ update_env_var() {fi}-normalize_pusher_port() {- if grep -q "^PUSHER_PORT=8080$" "$ENV_FILE"; then- sed -i "s|^PUSHER_PORT=8080$|PUSHER_PORT=6001|" "$ENV_FILE"- echo " - Updated PUSHER_PORT from app HTTP port 8080 to Reverb port 6001"- fi-}-update_env_var "APP_ID" "$(openssl rand -hex 16)"update_env_var "APP_KEY" "base64:$(openssl rand -base64 32)"# update_env_var "DB_USERNAME" "$(openssl rand -hex 16)" # Causes issues: database "random-user" does not exist@@ -848,8 +841,6 @@ update_env_var "REDIS_PASSWORD" "$(openssl rand -base64 32)"update_env_var "PUSHER_APP_ID" "$(openssl rand -hex 32)"update_env_var "PUSHER_APP_KEY" "$(openssl rand -hex 32)"update_env_var "PUSHER_APP_SECRET" "$(openssl rand -hex 32)"-update_env_var "PUSHER_PORT" "6001"-normalize_pusher_portupdate_env_var "PUSHER_BACKEND_PORT" "6001"# Add default root user credentials from environment variablesdiff --git a/scripts/upgrade.sh b/scripts/upgrade.shindex 5814c9b000..c3cdf00593 100644--- a/scripts/upgrade.sh+++ b/scripts/upgrade.sh@@ -133,13 +133,6 @@ update_env_var() {fi}-normalize_pusher_port() {- if grep -q "^PUSHER_PORT=8080$" "$ENV_FILE"; then- sed -i "s|^PUSHER_PORT=8080$|PUSHER_PORT=6001|" "$ENV_FILE"- log "Updated PUSHER_PORT from app HTTP port 8080 to Reverb port 6001"- fi-}-set_env_var() {local key="$1"local value="$2"@@ -158,8 +151,6 @@ set_env_var "REGISTRY_URL" "$REGISTRY_URL"update_env_var "PUSHER_APP_ID" "$(openssl rand -hex 32)"update_env_var "PUSHER_APP_KEY" "$(openssl rand -hex 32)"update_env_var "PUSHER_APP_SECRET" "$(openssl rand -hex 32)"-update_env_var "PUSHER_PORT" "6001"-normalize_pusher_portupdate_env_var "PUSHER_BACKEND_PORT" "6001"log "Environment variables check complete"echo " Done."diff --git a/tests/Feature/ReverbAndTerminalPackagingTest.php b/tests/Feature/ReverbAndTerminalPackagingTest.phpindex 057b64237c..9be07c046f 100644--- a/tests/Feature/ReverbAndTerminalPackagingTest.php+++ b/tests/Feature/ReverbAndTerminalPackagingTest.php@@ -110,23 +110,45 @@ it('uses Pusher environment keys for self-hosted Reverb compatibility', function}});-it('defaults the public Pusher websocket port to Reverb instead of the HTTP app port', function () {+it('keeps the public websocket port adaptive and configures only the internal Reverb port', function () {expect(file_get_contents(base_path('.env.production')))->not->toContain('PUSHER_PORT=')->not->toContain('PUSHER_BACKEND_PORT=')->and(file_get_contents(base_path('.env.windows-docker-desktop.example')))- ->toContain('PUSHER_PORT=6001')+ ->not->toContain('PUSHER_PORT=')->toContain('PUSHER_BACKEND_PORT=6001')->and(file_get_contents(base_path('scripts/install.sh')))- ->toContain('update_env_var "PUSHER_PORT" "6001"')+ ->not->toContain('update_env_var "PUSHER_PORT"')->toContain('update_env_var "PUSHER_BACKEND_PORT" "6001"')- ->toContain('normalize_pusher_port')->and(file_get_contents(base_path('scripts/upgrade.sh')))- ->toContain('update_env_var "PUSHER_PORT" "6001"')- ->toContain('update_env_var "PUSHER_BACKEND_PORT" "6001"')- ->toContain('normalize_pusher_port');+ ->not->toContain('update_env_var "PUSHER_PORT"')+ ->toContain('update_env_var "PUSHER_BACKEND_PORT" "6001"');});+it('does not use the browser websocket port as the Docker host port', function (string $composeFile) {+ expect(file_get_contents(base_path($composeFile)))+ ->toContain('"${SOKETI_PORT:-6001}:6001"')+ ->not->toContain('"${PUSHER_PORT:-6001}:6001"');+})->with([+ 'production compose' => ['docker-compose.prod.yml'],+ 'nightly production compose' => ['other/nightly/docker-compose.prod.yml'],+ 'windows compose' => ['docker-compose.windows.yml'],+ 'nightly windows compose' => ['other/nightly/docker-compose.windows.yml'],+]);++it('preserves existing public websocket port overrides during install and upgrade', function (string $script) {+ $contents = file_get_contents(base_path($script));++ expect($contents)+ ->not->toContain('normalize_pusher_port')+ ->not->toMatch('/(?:set|update)_env_var "PUSHER_PORT"/');+})->with([+ 'install script' => ['scripts/install.sh'],+ 'upgrade script' => ['scripts/upgrade.sh'],+ 'nightly install script' => ['other/nightly/install.sh'],+ 'nightly upgrade script' => ['other/nightly/upgrade.sh'],+]);+it('stops publishing or preserving the obsolete realtime image', function () {$productionInstallScript = file_get_contents(base_path('scripts/install.sh'));$nightlyInstallScript = file_get_contents(base_path('other/nightly/install.sh'));