We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 567853e commit c10edc8Copy full SHA for c10edc8
railties/lib/rails/generators/rails/app/templates/docker-entrypoint.tt
@@ -1,17 +1,9 @@
1
#!/bin/bash -e
2
3
# Enable jemalloc for reduced memory usage and latency.
4
-jemalloc_found=false
5
-for lib in /usr/lib/*/libjemalloc.so.2; do
6
- if [ -f "$lib" ]; then
7
- export LD_PRELOAD="$lib"
8
- jemalloc_found=true
9
- break
10
- fi
11
-done
12
-
13
-if [ "$jemalloc_found" = false ]; then
14
- echo "Warning: jemalloc not found"
+if [ -z "${LD_PRELOAD+x}" ]; then
+ LD_PRELOAD=$(find /usr/lib -name libjemalloc.so.2 -print -quit)
+ export LD_PRELOAD
15
fi
16
17
<% unless skip_active_record? -%>
0 commit comments