Pull down new docker-entrypoint
This commit is contained in:
parent
6928eb44a5
commit
c9b79ec9ea
2 changed files with 6 additions and 9 deletions
|
@ -60,3 +60,4 @@ ENTRYPOINT ["/rails/bin/docker-entrypoint"]
|
|||
|
||||
# Start the server by default, this can be overwritten at runtime
|
||||
EXPOSE 3000
|
||||
CMD ["./bin/rails", "server"]
|
||||
|
|
|
@ -1,12 +1,8 @@
|
|||
#!/bin/sh
|
||||
#!/bin/bash -e
|
||||
|
||||
if [ $# -eq 0 ]; then
|
||||
# Create new or migrate existing database
|
||||
# If running the rails server then create or migrate existing database
|
||||
if [ "${*}" == "./bin/rails server" ]; then
|
||||
./bin/rails db:prepare
|
||||
|
||||
# Start the server by default
|
||||
exec bin/rails server
|
||||
else
|
||||
# Allow other commands, like console or runner, to be called
|
||||
exec bin/rails "$@"
|
||||
fi
|
||||
|
||||
exec "${@}"
|
||||
|
|
Loading…
Reference in a new issue