Deploying

Deploying Jumpstart Pro is easy. We've even configured a staging environment for you.

You'll need a Redis and PostgreSQL database setup to deploy Jumpstart Pro.

Environments

Jumpstart Pro is preconfigured with two environments for deploying: staging and production.

Background workers will be configured to run in all environments so you will have the same experience in development as you will in staging and production.

Email providers will only be configured for production by Jumpstart Pro, so you don't accidentally send emails to real users in staging.

Credentials

You will need to take the contents of config/credentials/staging.key or config/credentials/production.key (depending on what env you're deploying) and set the RAILS_MASTER_KEY environment variable to the contents of this file. This will allow staging or production to decrypt your credentials for the correct environment.

Hatchbox

Hatchbox.io is built by the makers of Jumpstart Pro and GoRails. It's a fantastically simple and cheap option for deploying apps to your own servers.

Heroku

Deploying to Heroku is easy. Jumpstart Pro includes a Procfile to help automatically configure your Heroku processes.

Deploy using Heroku Deploy Button

Jumpstart Pro comes with an app.json file that helps Heroku pre-configure your application if you use GitHub to host your Jumpstart Pro repo.

Heroku will use your connected GitHub account to access the private repo and find the app.json to pre-configure your new app. You can read more about the Heroku Deploy Button for private repos here.

Simply copy this URL and paste it into your browser, then change the GitHub URL to point to your private repository.

https://dashboard.heroku.com/new?template=https://github.com/excid3/jumpstart-pro

Deploy using Heroku CLI

First, you'll need to install the Heroku CLI and login with heroku login

Now you can create a Heroku app by running heroku create myapp

We also need to tell Heroku which buildpacks to use:

heroku buildpacks:set heroku/ruby
heroku buildpacks:add --index 1 heroku/nodejs

You'll need to setup PostgreSQL and Redis addons to run your app.

heroku addons:create heroku-postgresql:hobby-dev
heroku addons:create heroku-redis:hobby-dev

Afterwards, you need to add the RAILS_MASTER_KEY environment variable and set it equal to the key inside config/credentials/production.key.

Then you can deploy your code to Heroku and run migrations.

git push heroku master
heroku run rails db:migrate

Docker

We provide a sample Dockerfile and docker-compose.yml for you in case you'd like to deploy your application using Docker.

Creating An Admin User

To create an admin user in production, you can either generate one using db/seeds.rb or run the following code in the rails console in production.

User.create name: "Steve Jobs", email: "[email protected]", password: "password", password_confirmation: "password", admin: true, terms_of_service: true