mirror of
https://github.com/Blockstream/satellite-api.git
synced 2024-11-19 04:50:01 +01:00
16 lines
389 B
Bash
Executable File
16 lines
389 B
Bash
Executable File
#!/bin/bash
|
|
set -eo pipefail
|
|
|
|
# create or migrate the db (if needed)
|
|
if [ ! -f /data/ionosphere/ionosphere_production.sqlite3 ]; then
|
|
bundle exec rake db:create
|
|
bundle exec rake db:schema:load
|
|
fi
|
|
bundle exec rake db:migrate
|
|
|
|
bundle exec rackup --host 0.0.0.0
|
|
|
|
# shutdown the entire process when any of the background jobs exits (even if successfully)
|
|
wait -n
|
|
kill -TERM $$
|