From 5174602c31df6168a365f0045a1af4f10b13730b Mon Sep 17 00:00:00 2001 From: profitroll Date: Sat, 25 Nov 2023 18:12:01 +0100 Subject: [PATCH] Added upgrade section --- README.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) 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.