Database creation with Docker
Now, we will have a real database to save our entities.
We will use Docker to have a container for a Postgres database. Create, at the root of the project, the file docker-compose.yml with following content
We are writing our database password in plain text. This is a security flaw. In the Configuration section, we'll learn how to fix this issue.
To turn on the container, use the following command
If you want to turn it off at some point, just use
Finally, to access our database, we can use pgAdmin. We shall register a server with the following settings
Name - Conrod
Host name/address - localhost
Port - 5432
Password - pass123
Save password? - Yes
Commit - Creating database
Last updated