Render
Deploy your Spree application to Render.com Platform as a Service platform
Overview
Render is a Platform as a Service that makes deploying and hosting Spree applications super easy.
Spree Starter is pre-configured to work with Render out of the box. It includes render.yaml file that is used to deploy the application.
Prerequisites
- Render account - you will also need to add a credit card to your Render account to be able to deploy the application.
- GitHub account
Setup repository
Firstly create your own repository based on Spree Starter template.
Go to Spree Starter repository and click on “Use this template” button and select “Create a new repository”.
Supply the repository name and click on “Create repository from template” button.
Now clone the repository to your local machine.
Now you can start working on your application. Make sure your environment is set up correctly (follow the Getting Started guide).
Running the bin/setup
script should set your SECRET_KEY_BASE
environment variable correctly in the .env
file.
Don’t share your .env
file with anyone!
Create Render account and connect your repository
Go to render.com and create an account. We recommend to use your GitHub account to sign up as it will automatically link your GitHub repositories to Render.
Create Render blueprint
Render blueprints are YAML files used to deploy your application to Render. They consist a list of services that are required to run your application.
In the Render dashboard select “New blueprint” from the “+New” button.
Now select your repository from the list of repositories.
You should see the the new blueprint form.
-
Set your blueprint name - eg.
Spree App
-
Generate a new
SECRET_KEY_BASE
value. -
Paste it to the
SECRET_KEY_BASE
environment variable for bothweb
andworker
services (it needs to be the same value for both).
After that is done click the “Deploy Blueprint” button. Now wait a few minutes for Render to setup your application.
You should see the following screen with the list of created services.
That’s it! Your application is now deployed to Render.
You can now access the admin dashboard of your application at the following URL.
The default credentials are:
We recommend changing credentials after logging in! You can also do it from the Rails console. In your Render dashboard select your web
service and click on the “Shell” tab.
Now you can open the Rails console by running bin/rails console
.
Render will automatically any new changes you push to your repository.
Next steps
Now that your application is deployed, you also need to setup asset storage as Render only provides ephemeral storage.
- Setup Asset storage (Amazon S3/Cloudflare R2)
Before going to full production, we recommend to also: