#!/bin/sh # check-ports.sh detects and warns if required ports are already in use # or if they are configured to be the same. # Intended for lightweight Alpine containers (uses busybox netstat). # Define ports from ENV variables, applying defaults PORT_APP=${PORT:-20211} PORT_GQL=${APP_CONF_OVERRIDE:-${GRAPHQL_PORT:-20212}} # Check if ports are configured to be the same if [ "$PORT_APP" -eq "$PORT_GQL" ]; then cat </dev/null 2>&1; then cat <