scalableinternetservicesarchive / Luber

Luber : :oncoming_automobile: A ridesharing App :oncoming_taxi:
http://www.luber.fun
14 stars 11 forks source link

Seed file for 'production' environment #115

Closed justinpearson closed 6 years ago

justinpearson commented 6 years ago

This PR addresses issue #98 .

To use this seed file in production:

  1. Log in to EC2

  2. cd to your personal directory

  3. Then:

    EC2$ git pull EC2$ eb deploy # if it's still running, or 'eb create ...' if not. EC2$ eb ssh -e 'ssh -i ~/luber.pem'

  4. Now you're in the production machine (the App Server).

    PRODUCTION-MACHINE$ cd /var/app/current

    PRODUCTION-MACHINE$ date ; echo 'ActiveRecord::Base.logger.level = 1 ; Rental.destroy_all ; Tag.destroy_all ; Tagging.destroy_all ; Car.destroy_all ; User.destroy_all ; ActiveRecord::Base.logger.level = 0' | rails c ; date

    PRODUCTION-MACHINE$ rails db:seed

kylecrsn commented 6 years ago

Looks good, I'll merge my stuff after this