Skip to content

Research on the docker containers, web application, database, data engineering, visualization in python

Notifications You must be signed in to change notification settings

vladdsm/people-database

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

2 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

People Database

A simple fullโ€‘stack project demonstrating how to build a Flask web application backed by a PostgreSQL database, with pgAdmin included for database management.
The stack runs entirely in Docker containers, making it easy to start, stop, and reset.


๐Ÿ“Œ Purpose

The goal of this repository is to provide a minimal but complete example of:

  • Running a Python Flask app in Docker
  • Persisting data in a PostgreSQL database
  • Managing the database visually with pgAdmin
  • Using environment variables (.env) to keep secrets out of source code
  • Demonstrating a clean development workflow with Docker Compose

๐Ÿš€ How to Start

1. Clone the repository

git clone https://github.com/<your-username>/people-database.git
cd people-database
  • create folder db_data as this is where database content will be saved (assuming windows)

2. Create .env file

POSTGRES_USER=myuser
POSTGRES_PASSWORD=supersecret
POSTGRES_DB=mydb

PGADMIN_DEFAULT_EMAIL=admin@admin.com
PGADMIN_DEFAULT_PASSWORD=adminsecret

this file is ignored by Git (see .gitignore)

3. Build and run the containers

docker-compose up --build

This will start three services:

4. Use it

Access the Flask app

  • Open http://localhost:5000
  • The app connects to the Postgres database and displays data from the people table. Manage the database with pgAdmin
  • Go to http://localhost:8080
  • Log in with the credentials from .env (PGADMIN_DEFAULT_EMAIL / PGADMIN_DEFAULT_PASSWORD)

5. Result ๐Ÿ“ธ Demo

Hereโ€™s what the app looks like running locally:

People Database Screenshot

About

Research on the docker containers, web application, database, data engineering, visualization in python

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published