February 2019
Intermediate to advanced
240 pages
5h 25m
English
It’s great that we’ve set up our database so we can persist data in our Rails app. However, currently, there’s a major failing in how it works. Let’s see what the problem is, and see how to get around it.
Part of the philosophy of using Docker is that we should treat containers as ephemeral—throwaway things that we spin up, use, and then delete. However, our Postgres database is running in a container and persisting our data by writing and modifying files on disk inside the container. What happens to our data if we delete our database container? Yep, you’ve guessed it: we say bye bye to all our lovely data. Not really what we want.
Now that we’re going to be storing important data in our database, we need to ...
Read now
Unlock full access