Sign inSign up

dubeysumit/pinggo

By dubeysumit

β€’Updated 6 months ago

A Django real-time chat app that lets users communicate via global, group and private chats.

Image
Languages & frameworks
Web servers
Databases & storage
0

424

dubeysumit/pinggo repository overview

⁠Pinggo – Django + Channels Production Image

A production-ready Docker image for Pinggo, a real-time social platform built with Django, ASGI (Daphne), PostgreSQL, and Redis.

This image is designed to run as part of a multi-container setup using Docker Compose, supporting scalable web applications with WebSocket capabilities.


β πŸš€ Features

  • Django (ASGI) with Daphne server
  • Real-time support using Django Channels + Redis
  • PostgreSQL-compatible database setup
  • Static file handling via collectstatic
  • Production-ready container configuration
  • Lightweight Python 3.12 base image

β πŸ—οΈ Architecture

Typical deployment setup:

Client β†’ Nginx β†’ Pinggo (Daphne ASGI)
                     ↓
              PostgreSQL (DB)
                     ↓
                 Redis (Channels)

β πŸ“¦ Image Details

  • Base Image: python:3.12-slim

  • Server: Daphne (ASGI)

  • Port: 8000

  • Entrypoint:

    • Waits for database readiness
    • Runs migrations
    • Collects static files
    • Starts ASGI server

β βš™οΈ Environment Variables

The container expects the following environment variables:

⁠Django
  • SECRET_KEY
  • DEBUG
  • ALLOWED_HOSTS
⁠Database
  • DB_NAME
  • DB_USER
  • DB_PASSWORD
  • DB_HOST
  • DB_PORT
⁠PostgreSQL (for db container)
  • POSTGRES_DB
  • POSTGRES_USER
  • POSTGRES_PASSWORD
⁠Redis
  • REDIS_HOST
  • REDIS_PORT

⁠▢️ Usage with Docker Compose

Example:

version: "3.9"

services:
  web:
    image: dubeysumit/pinggo:latest
    env_file:
      - .env
    depends_on:
      - db
      - redis

  db:
    image: postgres:15
    env_file:
      - .env
    volumes:
      - postgres_data:/var/lib/postgresql/data

  redis:
    image: redis:7

volumes:
  postgres_data:

β πŸ” Security Notes

  • Do not hardcode secrets inside the image
  • Use .env files or platform environment variables
  • Set DEBUG=False in production
  • Configure ALLOWED_HOSTS properly

β πŸ“ Static Files

  • Static files are collected at container startup
  • Recommended to use a shared Docker volume
  • Served via Nginx in production

⁠⚠️ Important Notes

  • This image does not include PostgreSQL or Redis
  • Requires external services for database and caching
  • Designed for orchestration via Docker Compose or Kubernetes

β πŸ› οΈ Development vs Production

ModeServer
DevelopmentDjango runserver
ProductionDaphne (ASGI)

β πŸ“Œ Future Improvements

  • HTTPS support with Nginx + Let’s Encrypt
  • CI/CD pipeline integration
  • Horizontal scaling with multiple web containers

β πŸ“„ License

This project is licensed under the MIT License.


⁠⬇️ More

For a full production setup (Nginx, volumes, etc.), see the GitHub repository.

https://github.com/Sumit0ubey/Pinggo

β πŸ‘¨β€πŸ’» Maintainer

Developed and maintained by Sumit Dubey.

Tag summary

Content type

Image

Digest

sha256:88ff55c08…

Size

109.4 MB

Last updated

6 months ago

docker pull dubeysumit/pinggo:v.1.5