Commit 183dc400 authored by Markus Mößler's avatar Markus Mößler
Browse files

added additional documentation on accessing postgres service

parent 4817a0b6
Loading
Loading
Loading
Loading
+44 −1
Original line number Diff line number Diff line
@@ -169,3 +169,46 @@ graph TD
---

This architecture provides a solid foundation for building a more complex web application. Future enhancements might include additional user roles, improved UI, or REST API support.

## Additional Notes

Enter the postgres database container using,

```bash
docker exec -it tornado-backend_postgres_1 psql -U blog -d blog
```

1) Check the entries of the authors table,

```bash
SELECT * from authors;
```

Which results in, e.g., 

```psql
blog=# SELECT * from authors;
 id |         email         |     name      |                       hashed_password                        
----+-----------------------+---------------+--------------------------------------------------------------
  1 | first-blogger@blog.de | First Blogger | $2b$12$G0JKWQT7Tx1DoVqjze2mruM.kxmhP0EeiltKesZT5ZpqWlNnu3dOe
(1 row)
```

2) Check the entries of the entries table,

```psql
SELECT * from entries;
```

Which results in, e.g., 

```psql
blog=# SELECT * from entries;
 id | author_id |            slug             |            title            |                    markdown                    |                         html     
                     |         published          |          updated           
----+-----------+-----------------------------+-----------------------------+------------------------------------------------+----------------------------------
---------------------+----------------------------+----------------------------
  1 |         1 | first-post-by-first-blogger | First post by first blogger | This is the first post by the first blogger... | <p>This is the first post by the 
first blogger...</p> | 2024-12-06 17:23:18.595355 | 2024-12-06 17:23:18.595355
(1 row)
```
 No newline at end of file