Ruby Deploy Kickstart

Ruby (and Rails) deployment kickstart with dotEnv, Foreman, Ansible, Docker and Vagrant
Alternatives To Ruby Deploy Kickstart
Project NameStarsDownloadsRepos Using ThisPackages Using ThisMost Recent CommitTotal ReleasesLatest ReleaseOpen IssuesLicenseLanguage
a day ago122otherJava
Source for the TechEmpower Framework Benchmarks project
Ansible For Devops6,699
3 months ago90mitPython
Ansible for DevOps examples.
Shutit2,10823a year ago635June 29, 20229mitPython
Automation framework for programmers
Infrastructure As Code Tutorial2,065
6 months ago11apache-2.0
Infrastructure As Code Tutorial. Covers Packer, Terraform, Ansible, Vagrant, Docker, Docker Compose, Kubernetes
5 days ago4mitHCL
This is my personal template collection. Here you'll find templates, and configurations for various tools, and technologies.
Ansible Vagrant Examples1,988
6 months ago1mit
Ansible examples using Vagrant to deploy to local VMs.
2 months ago77mitRust
Vagga is a containerization tool without daemons
Kubernetes Vagrant Centos Cluster1,827
9 months ago17apache-2.0Shell
Setting up a distributed Kubernetes cluster along with Istio service mesh locally with Vagrant and VirtualBox, only PoC or Demo use.
2 years ago41gpl-3.0Python
A cryptocurrency trading environment using deep reinforcement learning and OpenAI's gym
Learning Tools1,434
2 months ago3mitPython
A collection of tools and files for learning new technologies
Alternatives To Ruby Deploy Kickstart
Select To Compare

Alternative Project Comparisons

Ruby (and Rails) Deployment Kickstart

A template for deploying Ruby and Rails applications, with automation support for Ansible, Docker and Vagrant. Copy this over to your project, and modify to fit.

Read the accompanying blog post for more details.


NOTE: The files will look overwhelming at first, because they contain Vagrant, Ansible and Docker. You don't need everything. If you don't want Docker, get rid of Docker-related files. Similarly, if you don't want Ansible or Vagrant, get rid of those files.

  • Core application files are: myapp.rb,, myjobs.rb
  • Core supporting files are: .env, Procfile, Gemfile*, provisioning/roles/myapp/files/.env
    • The default .env file is suitable for development mode
    • In production, it is overwritten with provisioning/roles/myapp/files/.env
  • Docker: .dockerignore, Dockerfile
  • Vagrant: Vagrantfile
  • Ansible: provisioning/*


  • Install Vagrant and VirtualBox
    • Preferably, install vagrant-cachier, vagrant-exec and vagrant-faster plugins for a faster development experience
  • Run: vagrant up
  • Run: vagrant ssh > cd /vagrant > foreman start
    • Or if you have installed vagrant-exec, simply run vagrant exec foreman start
  • Go to localhost:3000, it will echo you a message with development configurations

Production using Ansible

Supports only Debian and Ubuntu for now


  • Stop everything else: vagrant halt
  • Start the Prod VM: vagrant up prod
  • Go to localhost:3000, it will echo you the same message with production configuration

Actual Deployment:

  • Go to provisioning folder
  • Edit prod_inventory and update your production server name
  • Run: ansible-playbook -i prod_inventory -u <username> -vvv prod.yml

Production using Docker

Supports any OS that can run Docker, not limited to Debian/Ubuntu


  • Stop everything else: vagrant halt
  • Start the Docker VM: vagrant up docker
  • Go to localhost:3000, it will echo you the same message with production configuration, except things are running using Docker now

Actual Deployment:

  • Check the Docker section in Vagrantfile for the build and run commands
  • A full discussion of Docker is beyond the scope of this, but the gist is:
    • Build the Docker image (can be done locally or on the server)
    • Push it to a registry (not needed if you built on the server)
    • Run it in the server
    • For exact commands, check the Docker section in Vagrantfile

In case of errors

  • Destroy the VMs: vagrant destroy
  • Start whatever you want up again

Using it in your project:

  • Add Foreman and rails_12factor to your Gemfile
  • Copy necessary files (provisioning, .env, Procfile, Vagrantfile, Dockerfile) from here to your project
  • Modify them to fit, especially:
    • Procfile commands
    • roles/myapp/
  • Encrypt production configuration (using git-crypt, ansible vault, or anything else)
    • provisioning/roles/myapp/files should be encrypted
Popular Vagrant Projects
Popular Docker Projects
Popular Virtualization Categories

Get A Weekly Email With Trending Projects For These Categories
No Spam. Unsubscribe easily at any time.
Ruby On Rails