Creating and running rails applications completely using docker is fun. Without docker – installation of ruby, dev packages for some of the gems, installing databases and managing multiple versions of any of these is a lot of pain. In this screencast, I will show you how to create a rails application using Docker and Docker Compose.
I used Docker Compose orchestrate two services – First is the MySQL database service and second is an application service which is basically the rails application we build and the app service, the rails application, will connect to database service.
Here is what we are going to go through in the screencast,
- Create rails application using Docker
- Define Docker Compose YAML to define database and app/rails service
- Generate a scaffold to build out some pages & content
- Run the application and the database service as containers using docker compose
- Test a few rails commands using docker, docker compose