Skip to content

Commit

Permalink
🔧 Add optional PORT argument
Browse files Browse the repository at this point in the history
  • Loading branch information
jemrobinson committed Feb 20, 2024
1 parent dbfbc3f commit 0d67182
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion docker/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# shellcheck disable=SC2086
# shellcheck disable=SC2089

# Required arguments
if [ -z "${BACKEND}" ]; then
echo "BACKEND environment variable is not set"
exit 1
Expand All @@ -22,6 +23,12 @@ if [ -z "${DOMAIN}" ]; then
exit 1
fi

# Arguments with defaults
if [ -z "${PORT}" ]; then
echo "PORT environment variable is not set: using default of 1389"
PORT="1389"
fi

# Optional arguments
EXTRA_OPTS=""
if [ -n "${ENTRA_TENANT_ID}" ]; then
Expand All @@ -34,5 +41,5 @@ hatch run python run.py \
--client-id "$CLIENT_ID" \
--client-secret "$CLIENT_SECRET" \
--domain "$DOMAIN" \
--port 1389 \
--port "${PORT}" \
$EXTRA_OPTS

0 comments on commit 0d67182

Please sign in to comment.