Skip to content

Instantly share code, notes, and snippets.

@juanhuttemann
Last active July 10, 2017 01:44
Show Gist options
  • Save juanhuttemann/b274ae8645d985e8b923f7f5cce58d37 to your computer and use it in GitHub Desktop.
Save juanhuttemann/b274ae8645d985e8b923f7f5cce58d37 to your computer and use it in GitHub Desktop.
Rails secret key, migrations, seeds and assets compile generation
#!/bin/bash
bundle install
OUTPUT="$(rails secret RAILS_ENV=production)"
SECRET="SECRET_KEY_BASE=${OUTPUT}"
echo $SECRET >> ~/.profile
rails db:migrate RAILS_ENV=production
rails db:seed RAILS_ENV=production
rails assets:precompile RAILS_ENV=production
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment