/why-notes

Why Notes is a website that allows you to write and share notes.

Primary LanguagePython

Why Notes

Why Notes is a website that allows you to write and share notes. It uses postgresql and redis to store data.

Set up

In a terminal, execute the following commands :

git clone git@github.com:maxime-bc/no-sql-project.git
cd no-sql-project
docker-compose up

Why Notes is now running at http://localhost:5000.

Project structure

This project uses three Docker containers : a python3 container with a Flask app, a postgresql container and a redis container.

This project uses a postgresql database to backup data from the app and a redis database is used as a mean to cache notes to avoid requesting them to the postgresql database each time the index page is shown.

When creating, updating or deleting a note, changes are applied to postgresql and redis databases.

Data stored in both postgresql and redis databases is persistent.

Connecting to databases

Connecting to the postgresql database :

docker exec -it postgresql_service psql docker docker

List all tables with SELECT * FROM pg_catalog.pg_tables;

Connecting to the redis database :

docker exec -it redis_service redis-cli

List all keys with keys *

Others