Skip to content

Commit c10edc8

Browse files
authored
Changes due to review
1 parent 567853e commit c10edc8

File tree

1 file changed

+3
-11
lines changed

1 file changed

+3
-11
lines changed

railties/lib/rails/generators/rails/app/templates/docker-entrypoint.tt

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,9 @@
11
#!/bin/bash -e
22

33
# 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"
4+
if [ -z "${LD_PRELOAD+x}" ]; then
5+
LD_PRELOAD=$(find /usr/lib -name libjemalloc.so.2 -print -quit)
6+
export LD_PRELOAD
157
fi
168

179
<% unless skip_active_record? -%>

0 commit comments

Comments
 (0)