#!/bin/bash

until head -c 0 </dev/tcp/database-host/5432; do sleep 1; done && rails server -b 0.0.0.0
#!/bin/bash

until rails runner "exit 1 unless ActiveRecord::Base.connection.active?" 2>/dev/null >/dev/null; do sleep 1; done && rails server -b 0.0.0.0
Use rails to check if database is up
Use rails to check if database is up
