From b71e65d1e33472f483f7da810fd3992cce568bbe Mon Sep 17 00:00:00 2001 From: Ryan W Date: Sat, 30 Sep 2023 21:01:33 -0700 Subject: [PATCH] Moving towards a consolidated entrypoint database setup --- bin/docker-entrypoint-production | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bin/docker-entrypoint-production b/bin/docker-entrypoint-production index 0848d2f..356d2de 100755 --- a/bin/docker-entrypoint-production +++ b/bin/docker-entrypoint-production @@ -1,10 +1,14 @@ #!/bin/bash -e +echo "${*}" + # If running the rails server then create or migrate existing database # if [ "${*}" == "./bin/rails server" ]; then # ./bin/rails db:prepare # fi -if [ -z "$RENDER" ]; then echo "var is unset"; else bin/rails db:migrate; fi +if [ -n "$RENDER" ]; then + ./bin/rails db:migrate +fi exec "${@}"