Skip to content

Latest commit

 

History

History
142 lines (94 loc) · 2.48 KB

File metadata and controls

142 lines (94 loc) · 2.48 KB

Deal Radar – Setup Guide

This guide will help you set up Deal Radar on your local machine and deploy it to Heroku.


Prerequisites

  • Python 3.8+
  • pip
  • Git
  • (Optional for local production) PostgreSQL
  • Heroku CLI
  • A free Heroku account

Local Installation Steps

  1. Clone the repository

    git clone https://github.com/yourusername/deal-radar.git
    cd deal-radar
  2. Create and activate a virtual environment

    python -m venv venv
    source venv/bin/activate  # On Windows: venv\Scripts\activate
  3. Install dependencies

    pip install -r requirements.txt
  4. Set up environment variables

    • Copy .env.example to .env
    • Fill in your Stripe, Cloudinary, and other keys
  5. Apply migrations

    python manage.py migrate
  6. Create a superuser (admin)

    python manage.py createsuperuser
  7. Run the development server

    python manage.py runserver
  8. Access the app


Deploying to Heroku

  1. Login to Heroku

    heroku login
  2. Create a new Heroku app

    heroku create your-app-name
  3. Set up Heroku Postgres (recommended for production)

    heroku addons:create heroku-postgresql:hobby-dev
  4. 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.)

  5. Push your code to Heroku

    git push heroku main

    (or git push heroku master if your default branch is master)

  6. Run migrations on Heroku

    heroku run python manage.py migrate
  7. Create a superuser on Heroku

    heroku run python manage.py createsuperuser
  8. Collect static files

    heroku run python manage.py collectstatic --noinput
  9. Open your deployed app

    heroku open

Troubleshooting

  • 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.