The script basically sets up the environment needed to deploy Django projects to Nginx server using Gunicorn
- Clone the Project from github
- Copy the files of the project to root folder of Django project (mainly : setup.py & setup)
- Give executable permissions to two .sh scripts in setup folder
- Run the setup.py in root folder using
python3 setup.py
- Put the configuration details, the script will automatically create virtual environment and install dependencies needed for the project run. Note : The project must have a requirements.txt file for dependency installation, also gunicorn should be added to requirements file as a prerequisite
- Incase of local machine setup, do add an entry for local domain used in nginx file to /etc/hosts file and restart nginx once.
- Now, check your browser with the domain your django project should have been deployed.