A full-stack online shop built with Django with payments, coupons, and discounts.
- 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
- 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
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
- Enable BuildKit:
export DOCKER_BUILDKIT=1
- Create a new builder:
NB: You can remove the builder by running the following command:
docker buildx create --name mybuilder --use
docker buildx rm mybuilder
- Build and push the image:
Example:
docker buildx build --platform linux/amd64,linux/arm64 -t [dockerhubusername]/[dockerhubimagename]:[tag] --push .
docker buildx build --platform linux/amd64,linux/arm64 -t rasterzoo/ecom:v0.0.3 --push .