Rack-based Apps

  1. Introduction
  2. Requirements
  3. Sample Rack-based Application

Introduction

Shelly Cloud supports rack compatible applications. It means that you can deploy applications written in frameworks such as sinatra or camping.

Requirements

In order to deploy rack-based application to Shelly Cloud, the application must meet the following requirements:

  1. Configuration file config.ru must be present. It's common that rack-based frameworks generate this file. If you don't have it in your app's root directory, check your frameworks documentation.
  2. Minimal set of gems.
    source :rubygems
    gem "rack"
    gem "rake"
    gem "thin"
  3. File named Rakefile in your project's root directory with dummy db:migrate and db:setup tasks.
    namespace :db do
      task :migrate
      task :setup
    end

Sample Rack-based Application

You can check out sample rack-based application on our github account. It's very minimal example and doesn't need database server.

Here is how deployment of this app looks like.

$ git clone git://github.com/shellycloud/sample-rack-app.git
$ cd sample-rack-app
$ shelly add --code-name rack-123 --databases none
Running: git remote add shelly git@git.shellycloud.com:rack-123.git
Creating Cloudfile

Project is now configured for use with Shell Cloud:
You can review changes using
  git status

When you make sure all settings are correct, add changes to your repository:
  git add .
  git commit -m "Application added to Shelly Cloud"

Deploy to your cloud using:
  git push shelly master

$ git add .
$ git commit -m "Added ShellyCloud Cloudfile"
$ git push shelly master
...
remote:  ---> Received push to cloud 'rack-123'
remote:  ---> Push accepted
remote:  ---> Start your cloud using: `shelly start --cloud rack-123`
...

$ shelly start --cloud rack-123
Starting cloud rack-123.
Check status with: `shelly list`

Talk to a human