Skip to content

ROD is like a rocket that brings you from ground (scratch) to the space (Kubernetes).

License

Notifications You must be signed in to change notification settings

wxw-matt/rails_on_docker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rails on Docker

Tools and Docker images to make a fast Ruby on Rails development environment. With the production templates, moving from development to production will be seamless.

Installation

Usage

Create a New Rails Project

The following command will Create a new project named t1 based on Rails 7 and using MySQL as the database.

./rod project new t1 -v 7 -m

project new is for creating projects.

-v or --version is for specifying the version of Rails. Either a complete version, like 7.0.1, or a major version 7 works. If a major version is given, the latest major version will be used to create the project.

-m or --mysql is to select MySQL.

-p or --pg is to select Postgresql.

-s or --sqlite3 is to select sqlite3.

The docker image for the new image will be created as well.

Using Rails Generator

Generate a scaffold:

./rod g scaffold post title:string content:text

Or

./rod generate scaffold post title:string content:text

Generate a controller

./rod g controller article index new create

Generate a model

./rod g model comment title:string content:text

Executing Rake Tasks

All tasks that can be executed by rails command are supported. For example: you can execute the tasks db:migrate and db:seed by the following command:

./rod tasks db:migrate db:seed

Build images for ARM64 (Apple M1) and AMD64

tools/build_multiplatform.sh full_tag Dockerfile

For example:

tools/build_multiplatform.sh wxwmatt/rails:7.0.2.2-alpine3.15 rails7/Dockerfile.rails7.0.2.2 

About

ROD is like a rocket that brings you from ground (scratch) to the space (Kubernetes).

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published