Skip to Content
Docker for Rails Developers
book

Docker for Rails Developers

by Rob Isenberg
February 2019
Intermediate to advanced
240 pages
5h 25m
English
Pragmatic Bookshelf
Content preview from Docker for Rails Developers

Quick Recap

In this chapter, we learned how to set up and configure a database for our Rails app—something the vast majority of Rails apps typically need.

Let’s review what we covered:

  • We started up a Postgres server in a container using Compose.

  • We verified that the Postgres server was running by connecting with the Postgres client from a separate container.

  • We configured our Rails app to talk to Postgres by installing the Postgres gem, modifying our database.yml file, and running the Rake task to create the databases.

  • We put our new database through its paces by generating a scaffold, running migrations, and inserting, deleting, and updating records.

  • We discussed why it’s a good idea to decouple our database container from data we want to persist. ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Learn Rails 6: Accelerated Web Development with Ruby on Rails

Learn Rails 6: Accelerated Web Development with Ruby on Rails

Adam Notodikromo
Mastering Ruby Closures

Mastering Ruby Closures

Benjamin Tan Wei Hao

Publisher Resources

ISBN: 9781680506730Errata Page