https://github.com/alvyynm/ecom
A Django-powered e-commerce shop with payment processing via Stripe, asynchronous task processing using Celery, RabbitMQ message broker, Redis for recommendations, Docker with Docker Compose for deployment, and PostgreSQL db.
https://github.com/alvyynm/ecom
celery django django-admin docker docker-compose nginx postgresql rabbitmq redis
Last synced: 3 months ago
JSON representation
A Django-powered e-commerce shop with payment processing via Stripe, asynchronous task processing using Celery, RabbitMQ message broker, Redis for recommendations, Docker with Docker Compose for deployment, and PostgreSQL db.
- Host: GitHub
- URL: https://github.com/alvyynm/ecom
- Owner: alvyynm
- License: gpl-3.0
- Created: 2024-11-19T04:24:55.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-12-17T15:00:53.000Z (over 1 year ago)
- Last Synced: 2025-05-21T10:49:27.191Z (about 1 year ago)
- Topics: celery, django, django-admin, docker, docker-compose, nginx, postgresql, rabbitmq, redis
- Language: HTML
- Homepage:
- Size: 539 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
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:
```bash
docker-compose -f docker-compose.yml -f docker-compose.dev.yml up -d
```
For production:
```bash
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:
```bash
export DOCKER_BUILDKIT=1
```
2. Create a new builder:
```bash
docker buildx create --name mybuilder --use
```
NB: You can remove the builder by running the following command:
```bash
docker buildx rm mybuilder
```
3. Build and push the image:
```bash
docker buildx build --platform linux/amd64,linux/arm64 -t [dockerhubusername]/[dockerhubimagename]:[tag] --push .
```
Example:
```bash
docker buildx build --platform linux/amd64,linux/arm64 -t rasterzoo/ecom:v0.0.3 --push .
```