Skip to content

The Ruby on Rails environment by Ruby, MariaDB, and Nginx that is defined by docker-compose.

License

Notifications You must be signed in to change notification settings

kmamiya/docker-compose_for_RMN

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

docker-compose_for_RMN

The Ruby on Rails environment by Ruby, MariaDB, and Nginx that is defined by docker-compose.

Usage

Build the new Rails Project.

this is build a docker-compose environment, and create a new Rails project on it.

  1. docker-compose build
  2. docker-compose run app bundle init
  3. add or change to gem 'rails' on Gemfile
  4. docker-compose run app bundle install
  5. docker-compose run app bundle exec rails new ../${APP_NAME} --database=mysql (${APP_NAME} is you set on docker-compose.yml)
    • you need overrite README.md (this file), Gemfile (created by bundle init), and .gitignore (is included this repositiory), maybe.
  6. edit config/database.yml, set the following;
    • set <%= ENV.fetch('DB_PASSWORD') %> to password
    • set <%= ENV.fetch('DB_HOST') %> to host
    • attention; THIS SETTING USE 'root' account of MariaDB
  7. docker-compose run app bundle exec rake db:create
  8. (Rails 6 only; append config.hosts << 'app' to config/application.rb
  9. docker-compose up
  10. access to http://<docker-host>/ by the web browser.

Boot the already exist Rails project.

  1. docker-compose build
  2. docker-compose run app bundle install
  3. docker-compose run app bundle exec rake db:create
  4. docker-compose up
  5. access to http://<docker-host>/ by the web browser.

About

The Ruby on Rails environment by Ruby, MariaDB, and Nginx that is defined by docker-compose.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published