diff --git a/entrypoint.sh b/entrypoint.sh index 449c73a..173b390 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -31,18 +31,13 @@ if [ -n "$1" ]; then echo "Running '$1'" $1 else - if [ "${TASK:-}" = "worker" ]; then - if [ ! -f /loomio/storage/migrations_ran ]; then - echo "first deploy, running DB setup..." - rake db:setup - touch /loomio/storage/migrations_ran - fi - - echo "running DB migrations..." - rake db:migrate - echo "DB migrations finished" - fi echo "starting loomio!" - /loomio/docker_start.sh + if [ "$TASK" = "worker" ]; then + bundle exec sidekiq + else + bundle install + bundle exec rake db:prepare + bundle exec puma -C config/puma.rb + fi fi