#!/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 [ -n "$RENDER" ]; then
  ./bin/rails db:migrate
fi

exec "${@}"
