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 10924d3 commit 567853eCopy full SHA for 567853e
railties/lib/rails/generators/rails/app/templates/docker-entrypoint.tt
@@ -1,8 +1,17 @@
1
#!/bin/bash -e
2
3
# Enable jemalloc for reduced memory usage and latency.
4
-if [ -z "${LD_PRELOAD+x}" ] && [ -f /usr/lib/*/libjemalloc.so.2 ]; then
5
- export LD_PRELOAD="$(echo /usr/lib/*/libjemalloc.so.2)"
+jemalloc_found=false
+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"
15
fi
16
17
<% unless skip_active_record? -%>
0 commit comments