From 64caf4a5ec8b80da68b3b550d221588912685a50 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Sat, 14 Sep 2024 03:32:44 -0400 Subject: [PATCH] fix: lowercase the service host when generated from the service type and name Closes #72 --- entrypoint | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/entrypoint b/entrypoint index d9b12c7..23fd536 100755 --- a/entrypoint +++ b/entrypoint @@ -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="dokku-${service_type}-${service_name}" + SERVICE_HOST="$(echo "dokku-${service_type}-${service_name}" | tr '[:upper:]' '[:lower:]')" 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)