Coder Social home page Coder Social logo

docker-compose_for_rmn's Introduction

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.

docker-compose_for_rmn's People

Contributors

kmamiya avatar

docker-compose_for_rmn's Issues

Blocked host: app (?)

http://localhost/ へアクセス;

Blocked host: app
To allow requests to app, add the following to your environment configuration:

config.hosts << "app"

config/application.rb へ config.hosts >> 'app' を追記したところ解消。

ただし、作業ミスでmariadbではなくsqlite3での起動になっている。再現テストが必要。

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.