From c6afdb09c07115dbc74cc23bc65b9061b6e8dbb4 Mon Sep 17 00:00:00 2001 From: stevensting Date: Wed, 19 Feb 2025 13:26:21 +0100 Subject: [PATCH] move contents of loomios docker_start.sh to entrypoint.sh. unclear why this helps --- entrypoint.sh | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) 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