From d6ac37a04ad948e238995a54935761aee4877448 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karol=20S=C3=B3jko?= Date: Wed, 16 Sep 2020 09:35:13 +0200 Subject: [PATCH] fix: docker entrypoint command interpret --- docker/entrypoint.sh | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh index 637b76ccb..7fc7f578b 100755 --- a/docker/entrypoint.sh +++ b/docker/entrypoint.sh @@ -1,7 +1,9 @@ #!/bin/sh set -e -case "$1" in +COMMAND=$1 && shift 1 + +case "$COMMAND" in 'start' ) echo "Prestart Step 1/1 - Removing server lock" rm -f /app/tmp/pids/server.pid @@ -9,6 +11,21 @@ case "$1" in bundle exec rails s -b 0.0.0.0 ;; + 'start-local' ) + echo "Prestart Step 1/5 - Removing server lock" + rm -f /app/tmp/pids/server.pid + echo "Prestart Step 2/5 - Cleaning assets" + bundle exec rails assets:clobber + echo "Prestart Step 3/5 - Installing dependencies" + npm install + echo "Prestart Step 4/5 - Creating Webpack bundle" + npm run bundle + echo "Prestart Step 5/5 - Compiling assets" + bundle exec rails assets:precompile + echo "Starting Server..." + bundle exec rails s -b 0.0.0.0 + ;; + * ) echo "Unknown command" ;;