Creating a Postgres dependency
Previously, all the data we wanted to store was temporary. Messages had a fixed lifetime and would expire automatically; if our application had a catastrophic failure then the worst-case scenario would be that our messages would be lost, which for TempMessenger is hardly an issue at all!
However, user accounts are a totally different kettle of fish altogether. They must be stored for as long as the user wishes and they must be stored securely. We also need a proper schema for these accounts to keep the data consistent. We also need to be able to query and update the data with ease.
For these reasons, Redis probably isn't the best solution. One of the many benefits of building microservices is that we aren't tied to a specific technology; just because our Message Service uses Redis for storage doesn't mean that our User Service has to follow suit...
Starting a Postgres Docker container
To begin, you will start a Postgres Docker container in your terminal:
$ docker...