testmycode/tmc-server

View on GitHub
dev-entry.sh

Summary

Maintainability
Test Coverage
#!/bin/bash
set -e

cmd="$@"

until psql -h "$DB_HOST" -p 5432 -U "postgres" -c '\l'; do
  >&2 echo "Postgres is unavailable - sleeping"
  sleep 1
done
if [ ! -z $cmd ]; then
 exec $cmd
fi

/app/script/background_daemon run &
bundle exec rails s -b 0.0.0.0