From 1ba0c629d3e7052abd2b3f6c6e4188e86766c374 Mon Sep 17 00:00:00 2001 From: Mauricio Siu Date: Sun, 30 Nov 2025 02:06:18 -0600 Subject: [PATCH] feat: add port availability check for Dokploy installation - Implemented a check to ensure that port 3000 is available before proceeding with the Dokploy installation. - Added error messages to inform users if a service is already running on port 3000, guiding them to stop the conflicting service. --- apps/website/public/canary.sh | 7 +++++++ apps/website/public/feature.sh | 7 +++++++ apps/website/public/install.sh | 7 +++++++ 3 files changed, 21 insertions(+) diff --git a/apps/website/public/canary.sh b/apps/website/public/canary.sh index 2f48dd4..f07ac3d 100644 --- a/apps/website/public/canary.sh +++ b/apps/website/public/canary.sh @@ -29,6 +29,13 @@ install_dokploy() { exit 1 fi + # check if something is running on port 3000 + if ss -tulnp | grep ':3000 ' >/dev/null; then + echo "Error: something is already running on port 3000" >&2 + echo "Dokploy requires port 3000 to be available. Please stop any service using this port." >&2 + exit 1 + fi + command_exists() { command -v "$@" > /dev/null 2>&1 } diff --git a/apps/website/public/feature.sh b/apps/website/public/feature.sh index 55b01f1..6444b37 100644 --- a/apps/website/public/feature.sh +++ b/apps/website/public/feature.sh @@ -29,6 +29,13 @@ install_dokploy() { exit 1 fi + # check if something is running on port 3000 + if ss -tulnp | grep ':3000 ' >/dev/null; then + echo "Error: something is already running on port 3000" >&2 + echo "Dokploy requires port 3000 to be available. Please stop any service using this port." >&2 + exit 1 + fi + command_exists() { command -v "$@" > /dev/null 2>&1 } diff --git a/apps/website/public/install.sh b/apps/website/public/install.sh index dc6f61d..a9920f3 100644 --- a/apps/website/public/install.sh +++ b/apps/website/public/install.sh @@ -45,6 +45,13 @@ install_dokploy() { exit 1 fi + # check if something is running on port 3000 + if ss -tulnp | grep ':3000 ' >/dev/null; then + echo "Error: something is already running on port 3000" >&2 + echo "Dokploy requires port 3000 to be available. Please stop any service using this port." >&2 + exit 1 + fi + command_exists() { command -v "$@" > /dev/null 2>&1 }