Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

start 1.1KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. #!/bin/sh
  2. servers="$(RAILS_ENV=$RAILS_ENV bundle exec rake servers 2>&1)"
  3. echo $servers
  4. if [ "$(echo "$servers" | cut -c0-2)" == "No" ]; then
  5. echo ">>> Adding test-install as the default server"
  6. bundle exec rake servers:add["https://test-install.blindsidenetworks.com/bigbluebutton/api","8cd8ef52e8e101574e400365b55e11a6"]
  7. bundle exec rake servers
  8. bundle exec rake status
  9. echo ">>> Server added by default must be enabled using the rake command"
  10. fi
  11. if [ "$RAILS_ENV" = "production" ] && [ "$DB_ADAPTER" = "postgresql" ]; then
  12. while ! curl http://$DB_HOST:${DB_PORT:-5432}/ 2>&1 | grep '52'
  13. do
  14. echo "Waiting for postgres to start up ..."
  15. sleep 1
  16. done
  17. fi
  18. db_create="$(RAILS_ENV=$RAILS_ENV bundle exec rake db:create 2>&1)"
  19. echo $db_create
  20. if [[ $db_create == *"already exists"* ]]; then
  21. echo ">>> Database migration"
  22. bundle exec rake db:migrate
  23. else
  24. echo ">>> Database initialization"
  25. bundle exec rake db:schema:load
  26. fi
  27. exec tini -- bundle exec puma -C config/puma.rb "$@"
  28. #tail -f /dev/null
  29. #bundle exec puma -C config/puma.rb
  30. #bundle exec rails s -b 0.0.0.0 -p 3000