Skip to content

Commit

Permalink
Merge pull request #80 from dokku/fix-host
Browse files Browse the repository at this point in the history
fix: convert underscore to dash in service host
  • Loading branch information
josegonzalez authored Sep 14, 2024
2 parents 8db43ef + 0ab6a92 commit dc7747d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion entrypoint
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ if [ -n "$SERVICE_TYPE" ] && [ -n "$SERVICE_NAME" ]; then
service_name=$(echo "$SERVICE_NAME" | tr .- _ | tr '[:lower:]' '[:upper:]')
host_prefix="DOKKU_${service_type}_${service_name}_PORT_"
if [ -z "$SERVICE_HOST" ] && [ -z "$SERVICE_HOST_ENV_VAR" ]; then
SERVICE_HOST="$(echo "dokku-${service_type}-${service_name}" | tr '[:upper:]' '[:lower:]')"
SERVICE_HOST="$(echo "dokku-${service_type}-${service_name}" | tr '[:upper:]' '[:lower:]' | tr _ -)"
fi
if [ -z "$SERVICE_PORT" ] && [ -z "$SERVICE_PORT_ENV_VAR" ]; then
SERVICE_PORT=$(env | sort | grep "$host_prefix" | grep PORT= | head -n1 | cut -d= -f2)
Expand Down

0 comments on commit dc7747d

Please sign in to comment.