diff options
author | Marius Peter <marius.peter@tutanota.com> | 2024-11-11 16:55:14 +0100 |
---|---|---|
committer | Marius Peter <marius.peter@tutanota.com> | 2024-11-11 16:55:14 +0100 |
commit | fea9476a591559bd8fdcf17b64e5114c592a5b08 (patch) | |
tree | 08aa0fdd62752f1d286aa66ac77413fb03d6d737 /bin/docker-entrypoint |
C'est l'heure d'assurer le suivi de quelques flacons!main
Diffstat (limited to 'bin/docker-entrypoint')
-rwxr-xr-x | bin/docker-entrypoint | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/bin/docker-entrypoint b/bin/docker-entrypoint new file mode 100755 index 0000000..840d093 --- /dev/null +++ b/bin/docker-entrypoint @@ -0,0 +1,13 @@ +#!/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 "${@}" |