Pull down new docker-entrypoint
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing

This commit is contained in:
Andrew Tomaka 2023-09-10 11:37:37 -04:00
parent 6928eb44a5
commit c9b79ec9ea
Signed by: atomaka
GPG key ID: 61209BF70A5B18BE
2 changed files with 6 additions and 9 deletions

View file

@ -60,3 +60,4 @@ ENTRYPOINT ["/rails/bin/docker-entrypoint"]
# 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"]

View file

@ -1,12 +1,8 @@
#!/bin/sh #!/bin/bash -e
if [ $# -eq 0 ]; then # If running the rails server then create or migrate existing database
# Create new or migrate existing database if [ "${*}" == "./bin/rails server" ]; then
./bin/rails db:prepare ./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 fi
exec "${@}"