Skip to content

Commit

Permalink
fix: docker entrypoint command interpret
Browse files Browse the repository at this point in the history
  • Loading branch information
karolsojko committed Sep 16, 2020
1 parent f440eaa commit d6ac37a
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion docker/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,14 +1,31 @@
#!/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
echo "Starting Server..."
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"
;;
Expand Down

0 comments on commit d6ac37a

Please sign in to comment.