/how-docker-and-rails-play-together

A simple template to show how you can use docker and a rails app with docker-compose.

Primary LanguageRuby

How docker and rails can play nice together

I stole this from Leandro Moreira and wanted to save this for another day.

Thanks a lot Leadro, you finally made Docker and Rails click for me.

  1. First create a rails app, for instance. rails new myapp --skip-active-record
  2. Second create a Dockerfile to create the 'web' container.
  3. Third create a docker-compose.yml to create infrastructure you need.
  4. Forth create a Dockerfile to create the nginx container.
  5. Fifth create a nginx.conf to create give nginx something to host.
  6. Sixth docker-compose up