Source code of the Rails application created during the course - https://devteds.com/episodes/1-rails-on-docker-create-and-run-rails-app-using-docker
Switch branches/tags
Nothing to show
Clone or download
Pull request Compare This branch is even with shettigarc:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
app
bin
config
db
lib
log
public
test
tmp
vendor/assets
.gitignore
Dockerfile
Gemfile
Gemfile.lock
README.md
Rakefile
config.ru
docker-compose.yml

README.md

README

Learn how to use docker / docker compose to create and run rails application.

Episode video link

Episode Video Link

Tested on

  • Mac OSX - 10.10.5
  • Docker - 1.12.1
  • Docker compose - 1.8.0

Instructions / commands

mkdir ~/projects/noteapp
cd ~/projects/noteapp
# Create Gemfile
# Create Dockerfile
# Create docker-compose.yml
docker-compose run app rails new . --force --database=mysql --skip-bundle
docker-compose build
docker-compose up
# http://localhost:3001
docker-compose run --rm app rails g scaffold note title body:text
docker-compose run --rm app rake db:migrate
# http://localhost:3001/notes