Multi-tenant self serve application to take backup of Fyle data
-
Fyle App registration (get your client_id and client_secret here)
- Login to Fyle
- Goto settings and click on Developers
- Click on create new app, enter the details and select type as OAuth 2.0
- For Redirect URI enter
- 'http://localhost:8000/main/callback/' for development
- 'https://your_domain/main/callback/' for production
- 'http://localhost:8000/accounts/fyle/login/callback/' for development
- 'https://your_domain/accounts/fyle/login/callback/' for production
- Note down the client_secret and client_id
-
Install the project dependencies by running
pip install -r requirements.txt
in a python environment of your choice- If you face an error related to mysql_config follow the steps in this article
-
Rename the file
.setup_template.sh
to.setup.sh
and customize it accordingly -
Run
source .setup.sh
to export the environment variables -
Run
python manage.py migrate
to populate your database -
Run
python manage.py createsuperuser
and follow the instructions to create a superuser -
Open django-admin and create a new record under Social Applications. Select Fyle as provider and enter your client_secret and client_id. Add our site to the Chosen sites on the bottom.
-
Create a log file at
/var/log/fyle/fyle_backup.log
-
Run
python manage.py runserver
to start the server on localhost -
You might want to comment out the FyleJobs section (
apps/backups/views.py
) during development -
Run
python manage.py collectstatic
to collect static files to static_root directory, before deploying onto a Prod server
Visit http://localhost:8000 to access the application