diff --git a/readme-vars.yml b/readme-vars.yml index 700bbcb..9042979 100644 --- a/readme-vars.yml +++ b/readme-vars.yml @@ -77,11 +77,11 @@ app_setup_block_enabled: true app_setup_block: | We provide aliases for the common commands that execute in the correct context so that environment variables from secrets are available to them: - * To generate keys for `SECRET_KEY_BASE` & `OTP_SECRET` run `docker run --rm -it --entrypoint /bin/bash lscr.io/linuxserver/mastodon:develop generate-secret` once for each. + * To generate keys for `SECRET_KEY_BASE` & `OTP_SECRET` run `docker run --rm -it --entrypoint /bin/bash lscr.io/linuxserver/mastodon:{{ release_tag }} generate-secret` once for each. - * To generate keys for `VAPID_PRIVATE_KEY` & `VAPID_PUBLIC_KEY` run `docker run --rm -it --entrypoint /bin/bash lscr.io/linuxserver/mastodon:develop generate-vapid` + * To generate keys for `VAPID_PRIVATE_KEY` & `VAPID_PUBLIC_KEY` run `docker run --rm -it --entrypoint /bin/bash lscr.io/linuxserver/mastodon:{{ release_tag }} generate-vapid` - * To generate keys for `ACTIVE_RECORD_ENCRYPTION_DETERMINISTIC_KEY`, `ACTIVE_RECORD_ENCRYPTION_KEY_DERIVATION_SALT`, & `ACTIVE_RECORD_ENCRYPTION_PRIMARY_KEY` run `docker run --rm -it --entrypoint /bin/bash lscr.io/linuxserver/mastodon:develop generate-active-record` + * To generate keys for `ACTIVE_RECORD_ENCRYPTION_DETERMINISTIC_KEY`, `ACTIVE_RECORD_ENCRYPTION_KEY_DERIVATION_SALT`, & `ACTIVE_RECORD_ENCRYPTION_PRIMARY_KEY` run `docker run --rm -it --entrypoint /bin/bash lscr.io/linuxserver/mastodon:{{ release_tag }} generate-active-record` Both of the secret generation aliases above can be run without any other setup having been carried out. @@ -95,6 +95,12 @@ app_setup_block: | For more information check out the [mastodon documentation](https://docs.joinmastodon.org/). + ### Upgrade from 4.7 to 5.0 + + * Stop your running 4.7 container and pull the new image, make sure the DB and Redis are still running + * Run `docker compose run --rm -e SKIP_POST_DEPLOYMENT_MIGRATIONS=true --entrypoint /bin/bash mastodon migrate` + * Once the migrations are complete, start the Mastodon container as normal + ### Running separate sidekiq instances It is currently only supported to run a single queue per container instance *or* all queues in a single container instance. @@ -172,6 +178,7 @@ init_diagram: | "mastodon:develop" <- Base Images # changelog changelogs: + - {date: "03.12.26:", desc: "Add migration helper for major version upgrades."} - {date: "29.11.26:", desc: "Fetch Ruby from library image to match the version required by upstream."} - {date: "18.11.26:", desc: "Build Ruby from source to match the version required by upstream."} - {date: "05.07.26:", desc: "Rebase to Alpine 3.24."} diff --git a/root/migrate b/root/migrate new file mode 100755 index 0000000..385b35d --- /dev/null +++ b/root/migrate @@ -0,0 +1,6 @@ +#!/usr/bin/with-contenv bash +# shellcheck shell=bash + +cd /app/www || exit 1 + +bundle exec rails db:migrate