This guide will help you set up Deal Radar on your local machine and deploy it to Heroku.
- Python 3.8+
- pip
- Git
- (Optional for local production) PostgreSQL
- Heroku CLI
- A free Heroku account
-
Clone the repository
git clone https://github.com/yourusername/deal-radar.git cd deal-radar -
Create and activate a virtual environment
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install dependencies
pip install -r requirements.txt
-
Set up environment variables
- Copy
.env.exampleto.env - Fill in your Stripe, Cloudinary, and other keys
- Copy
-
Apply migrations
python manage.py migrate
-
Create a superuser (admin)
python manage.py createsuperuser
-
Run the development server
python manage.py runserver
-
Access the app
- Open http://localhost:8000 in your browser
-
Login to Heroku
heroku login
-
Create a new Heroku app
heroku create your-app-name
-
Set up Heroku Postgres (recommended for production)
heroku addons:create heroku-postgresql:hobby-dev
-
Set environment variables on Heroku
-
You can set each variable using:
heroku config:set KEY=your_value
-
Set all required variables (SECRET_KEY, DEBUG, STRIPE keys, CLOUDINARY_URL, etc.)
-
-
Push your code to Heroku
git push heroku main
(or
git push heroku masterif your default branch is master) -
Run migrations on Heroku
heroku run python manage.py migrate
-
Create a superuser on Heroku
heroku run python manage.py createsuperuser
-
Collect static files
heroku run python manage.py collectstatic --noinput
-
Open your deployed app
heroku open
-
If you encounter issues, check your environment variables and dependencies.
-
For Stripe or Cloudinary errors, verify your API keys and dashboard settings.
-
For Heroku deployment issues, check logs with:
heroku logs --tail
For further help, open an issue or contact the maintainer.