budget/bin/docker-entrypoint
Andrew Tomaka 72ffe7215d
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing
Start running Rails from the main branch (#16)
Reviewed-on: #16
2024-06-21 23:35:36 -04:00

13 lines
381 B
Bash
Executable file

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