Next up is deploying voicey to Heroku.

Configuring for Heroku

  1. Create a Heroku account if you don't have one already.

Heroku Homepage

  1. Create a new Heroku app. Don't add the angle brackets <>:
heroku create <enter the name of app>
  1. Add fill in of this file with your Amazon s3 keys.
heroku config:set S3_BUCKET_NAME=your_bucket_name

heroku config:set AWS_ACCESS_KEY_ID=your_access_key_id

eroku config:set AWS_SECRET_ACCESS_KEY=your_secret_access_key

heroku config:set AWS_REGION=your_aws_region
  1. Provision a postgres database with:
heroku addons:create heroku-postgresql:hobby-dev
  1. Add our heroku database to the database.yaml file.
production:
  adapter: postgresql
  encoding: unicode
  pool: 5
  database: <%= ENV['DATABASE_URL'] %>
  username: <%= ENV['DATABASE_USERNAME'] %>
  password: <%= ENV['DATABASE_PASSWORD'] %>
  1. Push to heroku:
git push heroku master
  1. Run our migration for our new database
heroku run rails db:migrate

You should now have a running API on heroku!

Feedback

If you have feedback on this tutorial or find any mistakes, please open issues on the GitHub Repository or comment below.

Summer academy

An iOS Development Summer Course

Design, code and launch your own app. Locations in San Francisco and Asia

Find your location

Product College

A computer science college

Graduate into a successful career as a founder or software engineer.

Learn more

Cookies on Make School's website

We have placed cookies on your device to ensure that we give you the best experience on our website.

This site uses cookies to deliver our services. By using our site, you acknowledge that you have read and understand our Cookie Policy, Privacy Policy, and our Terms of Service. Your use of Make School’s Products and Services is subject to these policies and terms.

Please note that Make School no longer supports Internet Explorer

We recommend upgrading to a modern web browser. Learn more