Blame
| 669e20 | Ralph Thesen | 2025-07-09 21:25:16 | 1 | # Upgrade |
| 2 | ||||
| 3 | This pages describes how to upgrade An Otter Wiki to the latest version. The project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). |
|||
| 4 | ||||
| 5 | > [!IMPORTANT] |
|||
| 6 | > **Minor version upgrades, e.g. from 2.x to 2.y are effortless.** |
|||
| 7 | ||||
| 8 | If a new version does not work as expected, you can just roll back to the version you previously used. |
|||
| 9 | ||||
| 10 | Check the [CHANGELOG](https://github.com/redimp/otterwiki/blob/main/CHANGELOG.md) for information about fixes and new feature of recent releases. |
|||
| 11 | ||||
| 12 | ## docker cli |
|||
| 13 | ||||
| 14 | Make sure to collect the parameters you've used to create and run the container and start with cleaning up the existing container: |
|||
| 15 | ||||
| 16 | ```bash |
|||
| 17 | # stop the running container |
|||
| 18 | docker stop otterwiki |
|||
| 19 | # delete the container |
|||
| 20 | docker rm wiki |
|||
| 21 | ``` |
|||
| 22 | ||||
| 23 | Next step is fetching the new image via: |
|||
| 24 | ||||
| 25 | ```bash |
|||
| 26 | # pull the new image |
|||
| 27 | docker pull redimp/otterwiki:2 |
|||
| 28 | ``` |
|||
| 29 | ||||
| 30 | and recreate the container, make sure to use the parameters you have used before, e.g. |
|||
| 31 | ||||
| 32 | ```bash |
|||
| 33 | # create and run the new container using the latest image |
|||
| 34 | docker run --name otterwiki \ |
|||
| 35 | -p 8080:80 \ |
|||
| 36 | -v $PWD/app-data:/app-data \ |
|||
| 37 | redimp/otterwiki:2 |
|||
| 38 | ``` |
|||
| 39 | ||||
| 40 | ## docker compose |
|||
| 41 | ||||
| 42 | To upgrade An Otter Wiki deployed via `docker compose`, find the folder where your `docker-compose.yaml` or `compose.yaml` lives and run |
|||
| 43 | ||||
| 44 | ```bash |
|||
| 45 | docker compose pull && docker compose up -d |
|||
| 46 | ``` |
|||
| 47 | ||||
| 48 | This will pull the latest image and recreate the container if nececessary, so you can reduce the downtime to a minimum. |
|||
| 49 | ||||
| 50 | ## podman and podman-compose |
|||
| 51 | ||||
| 52 | Follow the process describe for `docker` and `docker compose` above. |
|||
| 53 | ||||
| 54 | ## Kubernetes |
|||
| 55 | ||||
| 56 | When you deployed An Otter Wiki using the official [helm chart](https://github.com/redimp/otterwiki/tree/main/helm) configure the application with `--set image.pullPolicy=Always` and let the deployment do a rollout restart e.g. |
|||
| 57 | ||||
| 58 | ```bash |
|||
| 59 | kubectl rollout restart deployment \ |
|||
| 60 | --namespace=NAMESPACE \ |
|||
| 61 | --selector=app.kubernetes.io/name=otterwiki |
|||
| 62 | ``` |
|||
| 63 | ||||
| 64 | ## source version |
|||
| 65 | ||||
| 66 | To check out the latest release run: |
|||
| 67 | ```bash |
|||
| 68 | # Update the repository information |
|||
| 69 | git remote update origin |
|||
| 70 | # Get the latest release tag |
|||
| 71 | LATEST_RELEASE=$(git describe --tags $(git rev-list --tags --max-count=1)) |
|||
| 72 | # Create a new branch named like the latest release version. |
|||
| 73 | git checkout -b $LATEST_RELEASE $LATEST_RELEASE |
|||
| 74 | ``` |
|||
| 75 | ||||
| 76 | When you installed An Otter Wiki in e.g. an virtual environemt `venv` update the venv using: |
|||
| 77 | ``` |
|||
| 78 | ./venv/bin/pip install -U . |
|||
| 79 | ``` |
|||
| 80 | ||||
| 81 | Restart the uwsgi server running the application, in case you are running it as an systemd service run a `systemctl restart otterwiki.service`. |
