Sign inSign up

muneebrather/quote-vault

By muneebrather

Updated 2 months ago

Flask + PostgreSQL quote app with upvote/downvote, demonstrating Docker manual networking.

Image
Languages & frameworks
Developer tools
Databases & storage
0

167

muneebrather/quote-vault repository overview

Quote Vault is a lightweight Flask application that serves random quotes with upvote/downvote functionality, backed by PostgreSQL. Built to demonstrate Docker networking, container-to-container communication, and persistent storage without using Docker Compose.

DOCKER CONCEPTS DEMONSTRATED:

  • Dockerfile from scratch with layer caching
  • Custom Docker bridge network (docker network create)
  • Container-to-container DNS resolution by name
  • Docker volumes for persistent database storage
  • .dockerignore for image hygiene
  • docker-entrypoint.sh for startup orchestration

TECH STACK:

  • Python 3.11
  • Flask
  • PostgreSQL 16 (Alpine)
  • Gunicorn
  • Docker

USAGE:

Create the Docker Network

docker network create quote.net

Start the PostgreSQL Container

docker run -d \
  --name db \
  --network quote.net \
  -e POSTGRES_USER=quotes \
  -e POSTGRES_PASSWORD=quotes \
  -e POSTGRES_DB=quotes \
  -v quote-data:/var/lib/postgresql/data \
  postgres:16-alpine

Start the Flask Application

docker run -d \
  --name vault \
  --network quote.net \
  -e DB_HOST=db \
  -e DB_USER=quotes \
  -e DB_PASS=quotes \
  -e DB_NAME=quotes \
  -p 5000:5000 \
  muneebrather/quote-vault:latest

Author

Muneeb Ahmad Rather

Tag summary

Content type

Image

Digest

sha256:4546d8a9c

Size

52.1 MB

Last updated

2 months ago

docker pull muneebrather/quote-vault