I’m trying to find a way to deploy my app that uses Django on the backend and React front end, and also uses the Spotify API.
Here’s a link to the Github.
I’ve seen some tutorials that suggest splitting it up and deploying them as two apps, where the backend proxies API requests to the backend as necessary, however since my React app is served with Django, I don’t think this method is conducive to how my app is set up.
Any help? I’d be much obliged.
I think you are right, you have a monolithic Django project, so you have to deploy it as a normal Django project. I think you should follow the book Deploying Django on a single Debian or Ubuntu server. Is a few outdated in the Django version but the general approach is really good
Now, I could advice you some improvements to your project repository:
- Remove your SECRET_KEY setting from your repository and put it in a environment variable.
- Add .DS_sore files to your .gitignore file
- Remove you database and virtual environment form the repository.
Thanks for the tips! I have the credentials stored in a .env file (just learned how to do this lol) but I’ll definitely take heed of your other tips.