back to puma
This commit is contained in:
+4
-1
@@ -68,4 +68,7 @@ HEALTHCHECK --interval=15s --timeout=3s --start-period=0s --start-interval=5s --
|
|||||||
CMD curl -f http://localhost:3000/up || exit 1
|
CMD curl -f http://localhost:3000/up || exit 1
|
||||||
# Start the server by default, this can be overwritten at runtime
|
# Start the server by default, this can be overwritten at runtime
|
||||||
EXPOSE 3000
|
EXPOSE 3000
|
||||||
CMD ["./bin/rails", "server"]
|
|
||||||
|
# The default Rails Dockerfile uses `./bin/rails server`, but when using Puma,
|
||||||
|
# they recommend using bundle exec puma. ref: https://github.com/puma/puma#rails
|
||||||
|
CMD ["bundle", "exec", "puma", "-C", "config/puma.rb"]
|
||||||
|
|||||||
+11
-5
@@ -1,16 +1,22 @@
|
|||||||
#!/bin/bash -e
|
#!/bin/bash -e
|
||||||
|
|
||||||
echo "entrypoint"
|
# Enable jemalloc for reduced memory usage and latency.
|
||||||
echo "${*}"
|
if [ -z "${LD_PRELOAD+x}" ] && [ -f /usr/lib/*/libjemalloc.so.2 ]; then
|
||||||
|
export LD_PRELOAD="$(echo /usr/lib/*/libjemalloc.so.2)"
|
||||||
|
fi
|
||||||
|
|
||||||
# NOTE: Enable this as you need to get migrations working in your deployed
|
# NOTE: Enable this as you need to get migrations working in your deployed
|
||||||
# (i.e. Production) environments. Match the condition check to what you have in
|
# (i.e. Production) environments. Match the condition check to what you have in
|
||||||
# the Dockerfile CMD. I use puma in the production.Dockerfile as that's the
|
# the Dockerfile CMD. I use puma in the production.Dockerfile as that's the
|
||||||
# recommended option by the Puma team (https://github.com/puma/puma#rails), but
|
# recommended option by the Puma team (https://github.com/puma/puma#rails), but
|
||||||
# the default Rails Dockerfile uses `./bin/rails server`
|
# the default Rails Dockerfile uses `./bin/rails server`
|
||||||
#
|
|
||||||
# If running the rails server then create or migrate existing database
|
# echo "${1}"
|
||||||
# if [ "${*}" == "./bin/rails server" ]; then
|
# echo "${2}"
|
||||||
|
# echo "${3}"
|
||||||
|
|
||||||
|
# # If running the rails server then create or migrate existing database
|
||||||
|
# if [ "${1}" == "bundle" ] && [ "${2}" == "exec" ] && [ "${3}" == "puma" ]; then
|
||||||
# ./bin/rails db:prepare
|
# ./bin/rails db:prepare
|
||||||
# fi
|
# fi
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user