This repository has been archived on 2021-02-17. You can view files and clone it, but cannot push or open issues or pull requests.
docker-standardfile/docker/entrypoint

29 lines
588 B
Bash
Executable File

#!/usr/bin/env sh
# $0 is a script name,
# $1, $2, $3 etc are passed arguments
# $1 is our command
CMD=$1
case "$CMD" in
'start' )
echo `pwd`
rm -f /data/src/tmp/pids/server.pid
cd /standardfile/
bundle exec rails db:create db:migrate
bundle install
bower install --allow-root
bundle exec rails s -b 0.0.0.0
;;
'bootstrap' )
cd /standardfile/
bundle exec rails db:create db:migrate
;;
* )
# Run custom command. Thanks to this line we can still use
# "docker run our_image /bin/bash" and it will work
exec "$@"
;;
esac