diff --git a/README.md b/README.md index 4fc6a52..3959476 100644 --- a/README.md +++ b/README.md @@ -59,6 +59,19 @@ First you need to have a Python interpreter, MongoDB and optionally git. You can Learn more about available uvicorn arguments using `uvicorn --help` +## Upgrading + +When a new version comes out, sometimes you want to upgrade your instance right away. Here's a checklist what to do: + +1. Carefully read the patch notes of the version you want to update to and all the versions that came out between the release of your version and the one you want to upgrade to. + Breaking changes will be marked so and config updates will also be described in the patch notes +2. Make a backup of your currently working instance. This includes both the PhotosAPI and the database +3. Download the latest version using git (`git pull` if you cloned the repo in the past) or from the releases +4. Reconfigure the config if needed and apply the changes from the patch notes +5. Upgrade the dependencies in your virtual environment using `pip install -r requirements.txt` +6. Start the migration using `python photos_api.py --migrate` from your virtual environment +7. Test if everything works and troubleshoot/rollback if not + ## Using as a service It's a good practice to use your API as a systemd service on Linux. Here's a quick overview how that can be done.