Giter VIP home page Giter VIP logo

dockrails's Introduction

Gem Version Build Status Coverage Status

Simple CLI to Generate and Run a Rails environment with Docker!

(using Docker, Docker-Compose and Docker-Sync behind the scenes)

About

Many of us have been struggling to setup a usable and efficient docker development environment for Rails App

This Gem include a CLI that generate your docker environment then provide a simple command to run it.

Web/Job containers sync code base from your Rails App in realtime, letting you code on you Mac and run in the same time everything from the container

Bundler Gems, DB and Redis data are persisted across restart and you can use ByeBug or Pry out of the box easily.

Currently the CLI offers a Docker environment with the option of:

  • PGSQL or MYSQL Database
  • Redis Database
  • Web and Job (Sidekiq) container

You can expand this scope very easily by modifying the output docker files generated.

asciicast

Install

gem install dockrails

Requirements

Commands

Create a folder on top of your Rails App, add your App inside it, then run:

  • dockrails init

Answer the different questions to build your docker environment and then you are ready to run it!

Start the containers:

  • dockrails start

Stop/Remove the containers:

  • dockrails clear

Build/Rebuild the docker image:

  • dockrails build

Run a command inside a container:

  • dockrails run CONTAINER COMMAND (ex: dockrails run web bundle install)

Attach TTY to a container (ex: for debugging with ByeBug or Pry):

  • dockrails attach CONTAINER โš ๏ธ DO NOT use CTRL+C here or it will exit the container but instead use CTRL+Q+P

Folder structure

my-docker-rails-env/
  bundle/
  data/
    sql/
    redis/
  Dockerfile
  docker-compose.yml
  docker-sync.yml
  YOUR_RAILS_APP/

dockrails's People

Contributors

gmontard avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.