Skip to content

Commit

Permalink
style: renamed variables for consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
nktnet1 committed Dec 25, 2024
1 parent 13c1ce0 commit fe38b8d
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 18 deletions.
16 changes: 8 additions & 8 deletions apps/docs/content/docs/core/manual-installation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ Here is a Bash script for installing Dokploy on a Linux server. Make sure you ru
#!/bin/bash

# Port Variables
DOKPLOY_HTTP_PORT=${DOKPLOY_HTTP_PORT:-80}
DOKPLOY_HTTPS_PORT=${DOKPLOY_HTTPS_PORT:-443}
TRAEFIK_PORT=${TRAEFIK_PORT:-80}
TRAEFIK_SSL_PORT=${TRAEFIK_SSL_PORT:-443}
DOKPLOY_APP_PORT=${DOKPLOY_APP_PORT:-3000}

# Ensure the script is run as root
Expand All @@ -41,13 +41,13 @@ if [ -f /.dockerenv ]; then
fi

# Check for occupied ports
if ss -tulnp | grep ":$DOKPLOY_HTTP_PORT " >/dev/null; then
echo "Error: Port $DOKPLOY_HTTP_PORT is already in use" >&2
if ss -tulnp | grep ":$TRAEFIK_PORT " >/dev/null; then
echo "Error: Port $TRAEFIK_PORT is already in use" >&2
exit 1
fi

if ss -tulnp | grep ":$DOKPLOY_HTTPS_PORT " >/dev/null; then
echo "Error: Port $DOKPLOY_HTTPS_PORT is already in use" >&2
if ss -tulnp | grep ":$TRAEFIK_SSL_PORT " >/dev/null; then
echo "Error: Port $TRAEFIK_SSL_PORT is already in use" >&2
exit 1
fi

Expand Down Expand Up @@ -116,8 +116,8 @@ docker service create \
--update-parallelism 1 \
--update-order stop-first \
-e PORT=$DOKPLOY_APP_PORT \
-e TRAEFIK_SSL_PORT=$DOKPLOY_HTTPS_PORT \
-e TRAEFIK_PORT=$DOKPLOY_HTTP_PORT \
-e TRAEFIK_PORT=$TRAEFIK_PORT \
-e TRAEFIK_SSL_PORT=$TRAEFIK_SSL_PORT \
-e ADVERTISE_ADDR=$advertise_addr \
dokploy/dokploy:latest

Expand Down
20 changes: 10 additions & 10 deletions apps/website/public/install.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/bin/bash

install_dokploy() {
DOKPLOY_HTTP_PORT=${DOKPLOY_HTTP_PORT:-80}
DOKPLOY_HTTPS_PORT=${DOKPLOY_HTTPS_PORT:-443}
TRAEFIK_PORT=${TRAEFIK_PORT:-80}
TRAEFIK_SSL_PORT=${TRAEFIK_SSL_PORT:-443}
DOKPLOY_APP_PORT=${DOKPLOY_APP_PORT:-3000}

if [ "$(id -u)" != "0" ]; then
Expand All @@ -22,15 +22,15 @@ install_dokploy() {
exit 1
fi

# check if something is running on DOKPLOY_HTTP_PORT (default 80)
if ss -tulnp | grep ":$DOKPLOY_HTTP_PORT " >/dev/null; then
echo "Error: something is already running on port $DOKPLOY_HTTP_PORT" >&2
# check if something is running on TRAEFIK_PORT (default 80)
if ss -tulnp | grep ":$TRAEFIK_PORT " >/dev/null; then
echo "Error: something is already running on port $TRAEFIK_PORT" >&2
exit 1
fi

# check if something is running on DOKPLOY_HTTPS_PORT (default 443)
if ss -tulnp | grep ":$DOKPLOY_HTTPS_PORT " >/dev/null; then
echo "Error: something is already running on port $DOKPLOY_HTTPS_PORT" >&2
# check if something is running on TRAEFIK_SSL_PORT (default 443)
if ss -tulnp | grep ":$TRAEFIK_SSL_PORT " >/dev/null; then
echo "Error: something is already running on port $TRAEFIK_SSL_PORT" >&2
exit 1
fi

Expand Down Expand Up @@ -101,8 +101,8 @@ install_dokploy() {
--update-order stop-first \
--constraint 'node.role == manager' \
-e ADVERTISE_ADDR=$advertise_addr \
-e TRAEFIK_SSL_PORT=$DOKPLOY_HTTPS_PORT \
-e TRAEFIK_PORT=$DOKPLOY_HTTP_PORT \
-e TRAEFIK_PORT=$TRAEFIK_PORT \
-e TRAEFIK_SSL_PORT=$TRAEFIK_SSL_PORT \
dokploy/dokploy:latest

GREEN="\033[0;32m"
Expand Down

0 comments on commit fe38b8d

Please sign in to comment.