Jumpstart docs logo Back to the app

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 environment 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.

Deploy to Hatchbox.io

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.

Deploy to Render.com

Jumpstart Pro comes with a render.yaml file that helps Render pre-configure your application.

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

https://render.com/deploy?repo=https://github.com/jumpstart-pro/jumpstart-pro-rails

Deploy to Heroku

Deploying your Jumpstart Pro application to Heroku is simple since 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 file 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 additionally need to setup the PostgreSQL and Redis addons to run your app.

heroku addons:create heroku-postgresql:mini
heroku addons:create heroku-redis:mini

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

Rails provides an example Dockerfile for production deployments which is included in Jumpstart Pro.

Kamal

We also provide config/deploy.yml for you if you'd like to deploy your application using Kamal. Replace IP addresses in the deploy.yml with that of your application.

Kamal uses dotenv to automatically load environment variables set in the .env.erb file in the application root. You can modify this file to add or customize environment variables.

Production Admin Users

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 = User.create! name: "Steve Jobs", email: "steve@apple.com", password: "password", password_confirmation: "password", terms_of_service: true
Jumpstart.grant_system_admin! user