This project is a web-based data recovery tool built with Django and Django Channels to support WebSockets.
- Python 3.7 or higher
- Django 3.x
- Channels 3.x
- Daphne 3.x
-
Clone the repository:
git clone https://github.com/yourusername/datarecoverytool.git cd datarecoverytool
-
Create and activate a virtual environment:
python -m venv venv source venv/bin/activate # On Windows use `venv\Scripts\activate`
-
Install dependencies:
pip install -r requirements.txt
-
Apply database migrations:
python manage.py migrate
-
Run the server: On Unix-like systems:
./run.sh
On Windows:
run.bat
-
Open your browser and navigate to:
http://127.0.0.1:8000
To deploy this app, you need to use a hosting service that supports ASGI applications. Some popular options are:
- Heroku
- AWS Elastic Beanstalk
- DigitalOcean App Platform
-
Install the Heroku CLI: Follow the instructions on the Heroku CLI installation page.
-
Log in to Heroku:
heroku login
-
Create a Heroku app:
heroku create your-app-name
-
Add the Heroku Postgres addon:
heroku addons:create heroku-postgresql:hobby-dev
-
Set environment variables:
heroku config:set DJANGO_SETTINGS_MODULE=datarecoverytool.settings.production
-
Deploy the app:
git push heroku main
-
Run database migrations:
heroku run python manage.py migrate
-
Open the app in your browser:
heroku open
-
Add
Procfile
to the root of your project:web: daphne -b 0.0.0.0 -p $PORT datarecoverytool.asgi:application
-
Ensure all dependencies are listed in
requirements.txt
When deploying the app, ensure that the hosting platform supports ASGI. The example above outlines how to set up and run the server both locally and on Heroku. Adjust the deployment steps according to your hosting provider if it differs from Heroku.