live at iammobilefriendly.dev
Django REST Framework backend, with a React + tailwind frontend. Deployed on Linux Ubuntu with nginx and gunicorn. PostgreSQL database.
- Create a virtual environment and activate it
- cd into the backend folder
- Install the requirements with
pip install -r requirements.txt
- Create production-settings.py file with required environment variables (import settings.py and override the variables you need)
- cd into the frontend folder
- Install the requirements with
npm install
- cd into the backend folder
- Run the server with
python manage.py runserver
- cd into the frontend folder
- Run the server with
npm start
- cd into the backend folder
- Run the server with
python manage.py collectstatic
- Run the server with `gunicorn --bind
- cd into the frontend folder
- Run the server with
npm run build
React build files will be in the build folder, django with nginx will serve them, make sure to set the static files path in production-Settings.py, and the nginx config file.