Files
api/bin/docker-entrypoint
T

21 lines
525 B
Bash
Raw Normal View History

2026-05-18 13:17:28 -04:00
#!/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
2026-07-23 10:41:46 -04:00
rm -f /usr/src/app/tmp/pids/server.pid
rm -rf /usr/local/bundle/cache/*.gem
echo "bundle install..."
bundle check || bundle install --jobs 4
2026-05-18 13:17:28 -04:00
exec "${@}"