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.
This commit is contained in:
Mauricio Siu
2025-11-30 02:06:18 -06:00
parent 7214380f79
commit 1ba0c629d3
3 changed files with 21 additions and 0 deletions

View File

@@ -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
}

View File

@@ -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
}

View File

@@ -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
}