mirror of
https://github.com/jokob-sk/NetAlertX.git
synced 2026-04-15 22:51:37 -07:00
BE: debug - removal of GRAPHQL PORT conflict check
Signed-off-by: jokob-sk <jokob.sk@gmail.com>
This commit is contained in:
@@ -5,22 +5,22 @@
|
|||||||
|
|
||||||
# Define ports from ENV variables, applying defaults
|
# Define ports from ENV variables, applying defaults
|
||||||
PORT_APP=${PORT:-20211}
|
PORT_APP=${PORT:-20211}
|
||||||
PORT_GQL=${APP_CONF_OVERRIDE:-${GRAPHQL_PORT:-20212}}
|
# PORT_GQL=${APP_CONF_OVERRIDE:-${GRAPHQL_PORT:-20212}}
|
||||||
|
|
||||||
# Check if ports are configured to be the same
|
# # Check if ports are configured to be the same
|
||||||
if [ "$PORT_APP" -eq "$PORT_GQL" ]; then
|
# if [ "$PORT_APP" -eq "$PORT_GQL" ]; then
|
||||||
cat <<EOF
|
# cat <<EOF
|
||||||
══════════════════════════════════════════════════════════════════════════════
|
# ══════════════════════════════════════════════════════════════════════════════
|
||||||
⚠️ Configuration Warning: Both ports are set to ${PORT_APP}.
|
# ⚠️ Configuration Warning: Both ports are set to ${PORT_APP}.
|
||||||
|
|
||||||
The Application port (\$PORT) and the GraphQL API port
|
# The Application port (\$PORT) and the GraphQL API port
|
||||||
(\$APP_CONF_OVERRIDE or \$GRAPHQL_PORT) are configured to use the
|
# (\$APP_CONF_OVERRIDE or \$GRAPHQL_PORT) are configured to use the
|
||||||
same port. This will cause a conflict.
|
# same port. This will cause a conflict.
|
||||||
|
|
||||||
https://github.com/jokob-sk/NetAlertX/blob/main/docs/docker-troubleshooting/port-conflicts.md
|
# https://github.com/jokob-sk/NetAlertX/blob/main/docs/docker-troubleshooting/port-conflicts.md
|
||||||
══════════════════════════════════════════════════════════════════════════════
|
# ══════════════════════════════════════════════════════════════════════════════
|
||||||
EOF
|
# EOF
|
||||||
fi
|
# fi
|
||||||
|
|
||||||
# Check for netstat (usually provided by busybox)
|
# Check for netstat (usually provided by busybox)
|
||||||
if ! command -v netstat >/dev/null 2>&1; then
|
if ! command -v netstat >/dev/null 2>&1; then
|
||||||
@@ -53,17 +53,17 @@ if echo "$LISTENING_PORTS" | grep -q ":${PORT_APP}$"; then
|
|||||||
EOF
|
EOF
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Check GraphQL Port
|
# # Check GraphQL Port
|
||||||
# We add a check to avoid double-warning if ports are identical AND in use
|
# # We add a check to avoid double-warning if ports are identical AND in use
|
||||||
if [ "$PORT_APP" -ne "$PORT_GQL" ] && echo "$LISTENING_PORTS" | grep -q ":${PORT_GQL}$"; then
|
# if [ "$PORT_APP" -ne "$PORT_GQL" ] && echo "$LISTENING_PORTS" | grep -q ":${PORT_GQL}$"; then
|
||||||
cat <<EOF
|
# cat <<EOF
|
||||||
══════════════════════════════════════════════════════════════════════════════
|
# ══════════════════════════════════════════════════════════════════════════════
|
||||||
⚠️ Port Warning: GraphQL API port ${PORT_GQL} is already in use.
|
# ⚠️ Port Warning: GraphQL API port ${PORT_GQL} is already in use.
|
||||||
|
|
||||||
The GraphQL API (defined by \$APP_CONF_OVERRIDE or \$GRAPHQL_PORT)
|
# The GraphQL API (defined by \$APP_CONF_OVERRIDE or \$GRAPHQL_PORT)
|
||||||
may fail to start.
|
# may fail to start.
|
||||||
|
|
||||||
https://github.com/jokob-sk/NetAlertX/blob/main/docs/docker-troubleshooting/port-conflicts.md
|
# https://github.com/jokob-sk/NetAlertX/blob/main/docs/docker-troubleshooting/port-conflicts.md
|
||||||
══════════════════════════════════════════════════════════════════════════════
|
# ══════════════════════════════════════════════════════════════════════════════
|
||||||
EOF
|
# EOF
|
||||||
fi
|
# fi
|
||||||
Reference in New Issue
Block a user