An online bookstore with these core features:
- Product management (
bookshop) - User accounts and authentication (
users,authentication) - Shopping cart and coupons (
cart,coupons) - Orders and payments (
orders,payment)
- Django
- MySQL
- Docker Compose (Nginx + Django + MySQL)
- Payment integrations: Braintree, VNPay
Copy the environment template:
cp bookstore/.env.example bookstore/.envUpdate key variables in bookstore/.env:
SECRET_KEYDB_*EMAIL_*BRAINTREE_*VNPAY_*
From the project root:
docker compose up --buildServices:
- Nginx is exposed at
http://localhost - Django runs internally on port
8001in the container - MySQL runs in the
dbservice
Run migrations:
docker compose exec django_app python manage.py migrateCreate an admin user:
docker compose exec django_app python manage.py createsuperuserCollect static files:
docker compose exec django_app python manage.py collectstatic --noinput- Admin:
/admin/ - Cart:
/cart/ - Orders:
/orders/ - Payment:
/payment/
- Payment testing guide:
bookstore/Testing payment .txt - If you run locally without Docker, install MySQL and dependencies from
bookstore/requirements.txt.