How to use PostgreSQL with Docker & Python (also Web UI)

preview_player
Показать описание
Setup Postgres locally with docker and interact with it using Python & a Web UI.

We set up Postgres locally from scratch using docker compose. We also setup a Web UI called Adminer which makes interacting with the Database easier. Lastly, we look at a Python library you can use to insert or read data easily from Postgres.

This can be a quick backend setup for any app that you develop. You can also spin it up inside an EC2 instance when deploying in prod. You will just have to tweak the Docker file to retain the docker volume.

0:00 Intro
0:32 Setup Docker Compose
3:27 Adminer Web UI
5:35 Python & Postgres
12:20 Recap & Outro

Docker Images:

#postgres #database #python #docker
Рекомендации по теме
Комментарии
Автор

unable to connect to the host name "database"..any help on this?

Harare
Автор

Reason: image not found, Library not loaded: @rpath/libpq.5.dylib any help?

deniseunitn
Автор

thanks for the video. I did not understand how you had connected to the postgres container through python script. Can you explain me that?

sunilbalu
Автор

So good tutorial, but I have a timed out error when mi API is trying to connect with postgres, do you know what can i do to resolve it?

BravoBuyo
Автор

Great tutorial, thank you! Would it make sense to have the python app running in its own docker container? If so, what would the docker compose file for that look like?

justinshankle
Автор

It would be great if you could share the code as well!

shaheerzaman