Updating or Patching NearBeach¶
NearBeach and it’s framework Django will need frequent updating/patching. (talk about security)
Updating Django (Web Framework)¶
It is recommended to install NearBeach on a Long Term Support (LTS) version of Django. Security fixes/patches are applied for a longer period of time, helping keep your server secure.
NearBeach currently supports the following Django versions;
- Django Version 2.2 LTS
- Django Version 3.0
More information about upgrading Django can be found found in the Django Documentation
NearBeach will be using the Semantic Versioning system. Version numbers will be laid out as follows; major.minor.patch
- MAJOR version changes means a new NearBeach. The changes are extensive that a new number for NearBeach is required.
- MINOR version changes means new functionality in NearBeach. This could require
- Database migrations
- Static file migrations
- PATCH versions mean very small changes. Usually this is to fix a bug or include a static file that was missing.
- Use ssh to connect with your web server
ssh <<webserver IP or address>>
- Use cd to navigate to your project directory
cd <<project location>>
- Activate your virtual environment for your web server
- Update NearBeach using PIP
pip install --upgrade NearBeach
If you require a certain version of NearBeach, use the following code as an examplepip install NearBeach==0.26.0
- Once NearBeach has been updated, you will still need to;
- Apply any database Migrations
- Collect any static files
- Use the following code to apply any migrations
python3 ./manage.py migrate
- Use the following code to collect any static files
python3 ./manage.py collectstatic
- Refresh gunicorn to enforce the new version
sudo service gunicorn refresh
Your new version of NearBeach should be ready.