18F/identity-idp

View on GitHub
deploy/migrate

Summary

Maintainability
Test Coverage
#!/bin/bash

# This script is called by identity-devops cookbooks as part of the deployment
# process. It runs any pending migrations.

set -euo pipefail

echo "deploy/migrate starting"
echo "HOME: ${HOME-}"
cd "$(dirname "$0")/.."

set -x

id
which bundle

export RAILS_ENV=production
export MIGRATION_STATEMENT_TIMEOUT=600000 # 10 minutes, units are 1/1000 of a second

bundle exec rake db:create db:migrate db:grant_readonly_access db:seed --trace

set +x

echo "deploy/migrate finished"