/rails_template

Application template for Rails project with docker.

Primary LanguageRuby

Description

Rails template with Docker

How to use

Use Docker

Install Docker

Download this repository and run container

$ git clone https://github.com/masayuki-0319/rails_template.git

$ mv rails_tamplate $PROJECT_NAME
$ cd $PROJECT_NAME

$ ./docker/entrypoint_for_repo_clone.sh

$ docker-compose up -d
$ docker-compose exec app ash

Generate Project

$ rails new . \
            -m https://raw.githubusercontent.com/masayuki-0319/rails_template/master/rails_template.rb \
            -d ("mysql" "postgresql" "etc...")

Non Docker

Generate Project

# Non Docker
$ rails new $PROJECT_NAME \
            -m https://raw.githubusercontent.com/masayuki-0319/rails_template/master/rails_template.rb \
            -d ("mysql" "postgresql" "etc...")

Others

RSpec Usage

# spec 生成コマンド( e.g. user 関係の場合)
$ rails g rspec:model user
$ rails g rspec:request users
$ rails g rspec:system user_registration
# 全体をテストする場合
$ rspec

# 一部をテストする場合(ディレクトリ、describe を指定可能)
$ rspec spec/models/user_spec.rb:12

Want use OSS

./docs ディレクトリに存在する OSS をご参照ください。 一部 README と重複しているため、適宜読み替えて設定願います。

Note

My references

Remaining OSS

May be more convenient