From fb27f4fcf5698c615d1aab8f2faad8cc9ab2b8aa Mon Sep 17 00:00:00 2001 From: Syd Young Date: Fri, 12 Mar 2021 14:19:51 -0800 Subject: [PATCH] Fix docker entrypoint --- docker/entrypoint.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh index 19fae2f96..95b447ae3 100755 --- a/docker/entrypoint.sh +++ b/docker/entrypoint.sh @@ -10,7 +10,9 @@ if [ "$TEST_DB_AUTO_MIGRATE" == "true" ]; then fi # host ip needed by application for better_errors whitelisting to work -export HOST_IP=`/sbin/ip route|awk '/default/ { print $3 }'` +if [ "$RAILS_ENV" == "development" ]; then + export HOST_IP=`/sbin/ip route|awk '/default/ { print $3 }'` +fi printenv | sed "s/^\([[:alnum:]_]*\)=\(.*\)$/export \1='\2'/" >/var/www/.profile