Full-Stack Django ecommerce project.
- Faker generate fakeproducts
- API support with Swagger and Redoc documentation
- Celery with Redis, Celery beat and Flower
- Docker-compose for Nginx, Gunicorn, PostgreSQL, Celery, Redis and etc.
- Install GTK-for-Windows-Runtime-Environment-Installer Public
- Install PostgreSQL Database (PgAdmin 14)
- To install Redis on Windows, you"ll first need to enable WSL2
- Now, Install Redis Server on WSL2.
git clone https://github.com/faizan35/fullstack-ecommerce.git
- This is for windows, Execute there incide cmd.
cd fullstack-ecommerce
pip install virtualenv
python -m venv myenv
myenv\Scripts\activate
- Same, in cmd terminal
cd core
pip install -r requirements.txt
- Inside SQL Shell (psql)
CREATE USER myuser WITH PASSWORD "mypassword";
CREATE DATABASE mydb OWNER myuser;
GRANT ALL PRIVILEGES ON DATABASE mydb TO myuser;
POSTGRES_DB=mydb
POSTGRES_USER=myuser
POSTGRES_PASSWORD=mypassword
POSTGRES_HOST=db
# POSTGRES_HOST=localhost
[email protected]
EMAIL_HOST_APP_PASSWORD=fake_pass
STRIPE_PUBLISHABLE_KEY=
STRIPE_SECRET_KEY=
STRIPE_API_VERSION=
STRIPE_WEBHOOK_SECRET=
YOOKASSA_SECRET_KEY=actualyourdata
YOOKASSA_SHOP_ID=actualyourdata
CELERY_RESULT_BACKEND=redis://localhost:6379/0
CELERY_BROKER_URL=redis://localhost:6379/0
Copy all this inside the env file, Only env values you need is of Stripe"s. We are NOT using YOOKASSA in this project.
-
STRIPE_PUBLISHABLE_KEY
: Can find in the Stripe Dashboard. -
STRIPE_SECRET_KEY
: Can find in the Stripe Dashboard. -
STRIPE_API_VERSION
: Can find in the Stripe Dashboard. -
STRIPE_WEBHOOK_SECRET
: Find Webhook
- Open your UI of Database
sudo service redis-server start
or
sudo systemctl start redis-server
redis-cli ping
for verification, You will getPONG
if it working.
- Navigate to the dir where you have installed stripe cli.
- Open cmd in that path and execute
stripe listen --forward-to localhost:8000/payment/stripe-webhook/
python manage.py migrate
python manage.py fakeproducts
python manage.py collectstatic --noinput
python manage.py runserver
POSTGRES_HOST=db
CELERY_RESULT_BACKEND=redis://redis:6379/0
CELERY_BROKER_URL=redis://redis:6379/0
docker exec -it your_postgres_container_name /bin/bash
psql -U myuser -d mydb
$ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
fullstack-ecommerce-celery latest 00f3e2f91984 About an hour ago 909MB
fullstack-ecommerce-celery-beat latest dede52007b1b About an hour ago 909MB
fullstack-ecommerce-backend latest 141b947b999c About an hour ago 909MB
nginx latest 39286ab8a5e1 4 weeks ago 188MB
redis 7.2.3-alpine d2d4688fcebe 9 months ago 41MB
postgres 13.0-alpine 700e581c202e 3 years ago 159MB
faizan44/fullstack-ecommerce-backend faizan44/fullstack-ecommerce-celery faizan44/fullstack-ecommerce-celery-beat
- Appent this after IP:
http://<IP>:8080/github-webhook/