View raw

1 #!/bin/bash -e 2 3 # Enable jemalloc for reduced memory usage and latency. 4 if [ -z "${LD_PRELOAD+x}" ] && [ -f /usr/lib/*/libjemalloc.so.2 ]; then 5 export LD_PRELOAD="$(echo /usr/lib/*/libjemalloc.so.2)" 6 fi 7 8 # If running the rails server then create or migrate existing database 9 if [ "${1}" == "./bin/rails" ] && [ "${2}" == "server" ]; then 10 ./bin/rails db:prepare 11 fi 12 13 exec "${@}" 14