Upgrade
Replace what is running. Migrations run on the way up, and the data stays where it is.
Nooks brings its schema up to date when it starts, so an upgrade is whatever replaces
the running version — and nothing else. The data is never in the thing you replace: it
is in the volume or the --data directory, which an upgrade does not touch.
Back up first. Migrations only run forwards, so the way back from a version you did not want is the copy you took before starting. It is one file — see Back up.
Replace what is running
Pull the new image, take the old container away, and start it again the way you started it the first time:
docker pull ghcr.io/hoshomoh/nooks
docker stop nooks && docker rm nooks
docker run -d --name nooks -p 8081:8081 -v nooks-data:/var/lib/nooks ghcr.io/hoshomoh/nooksRemoving the container does not remove the instance. Everything it has is in the
nooks-data volume, which outlives any number of containers — that is what a named
volume is for.
The last line has to repeat every flag the original had. Anything you set with -e,
any different port, a bind mount instead of a volume: all of it has to be typed again,
and anything forgotten is silently dropped. If that sounds like something you will get
wrong at some point, it is — which is the argument for Docker
Compose, where the flags live in a file instead of your shell
history.
Check what is running
docker exec nooks /usr/local/bin/nooks --versionOr ./nooks --version for a binary. Settings → About says the same thing without a
terminal.
Which version to move to
Images are tagged 1.2.3, 1.2 and latest. Pinning 1.2 gets you patches and no
surprises; pinning the full version gets you exactly what you tested. The
changelog says what is in each, and marks any release that changes the
shape of stored data.
What a migration will not do
Nooks will not silently take an ability away from something that is working. When access tokens gained three separate permissions, tokens that already existed kept everything they had — a migration that quietly narrows a key in use is a key that stops working for reasons nobody can see.