Skip to content

Latest commit

 

History

History
74 lines (66 loc) · 3.04 KB

README.md

File metadata and controls

74 lines (66 loc) · 3.04 KB

Djangocom

Django Ecommerce Shop

A full-stack online shop built with Django with payments, coupons, and discounts.

Key features

  • Authentication is done using Django's built-in authentication module for authentication but extended to allow email and password authentication.
  • Payments with Stripe, with webhooks used to verify the payment status
  • Sending order and payment confirmation messages asynchronously with RabbitMQ and Celery. Celery is used as the task processor and RabbitMQ as the message broker.
  • Product recommendations for products frequently bought together. This is implemented using Redis.
  • Both logged in and anonymous (unauthenticated users) can place orders

Quick Project Demo

Tech Stack:

  • Django
  • PostgreSQL database
  • Celery for processing tasks asynchronously
  • RabbitMQ as a message broker
  • Stripe for payment processing
  • Redis for product recommendations
  • Nginx as 1) a reverse proxy (sitting in front of your uWSGI application server) and 2) a static file server for serving static files directly instead of the slow Django server
  • Docker for containerization and Docker Compose to manage the multi-container setup

How to run

For development:

docker-compose -f docker-compose.yml -f docker-compose.dev.yml up -d

For production:

docker-compose -f docker-compose.yml -f docker-compose.prod.yml up -d

NB: You need to specify .env.dev for development and .env.prod for production at the root

Building a multi-architecture image

  1. Enable BuildKit:
    export DOCKER_BUILDKIT=1
  2. Create a new builder:
    docker buildx create --name mybuilder --use
    NB: You can remove the builder by running the following command:
    docker buildx rm mybuilder
  3. Build and push the image:
    docker buildx build --platform linux/amd64,linux/arm64 -t [dockerhubusername]/[dockerhubimagename]:[tag] --push .
    Example:
    docker buildx build --platform linux/amd64,linux/arm64 -t rasterzoo/ecom:v0.0.3 --push .