ぼざクリ タグ広場 https://hub.nizika.monster
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

15 lines
387 B

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