- Decide folder for environment. e.g. /media/www/captainslog.
- Go to media/www and download from github into new directory e.g. sudo git clone https://github.com/mjnaylor8/django-captainslog.git captainslog
- Create virtual environment. sudo python3 venv env
- Check it works OK. Go to env directory and run source bin/activate
- Move back up one directory and assuming there is a requirements.txt file run pip3 install -r requirements.txt
- Deploy any bespoke apps from github….. pip install git+https://github.com/mjnaylor8/django-mapbox-location-field.git
- Make changes to manage.py, asgi.py and wsgi.py to ensure pointing to production settings ….
os.environ.setdefault(‘DJANGO_SETTINGS_MODULE’, ‘captains_log.settings.production‘)
- Run python3 manage.py collectstatic to ensure all collected OK
- Restart emporer sudo systemctl restart emperor.uwsgi
- Restart nginx sudo systemctl restart nginx
- Pray it is OK