2.2 KiB
Downgrading to v20240206
systemd
-
Stop the Firefish service
sudo systemctl stop your-firefish-service.service
-
Take a backup
-
Revert database migrations
sudo --user=postgres psql --file=docs/downgrade.sql --dbname=database_name
The database name can be found in
.config/default.yml
.db: port: 5432 db: database_name # this one user: firefish pass: password
-
Switch back to the
v20240206
taggit switch v20240206
-
Rebuild Firefish
pnpm install --frozen-lockfile NODE_ENV='production' NODE_OPTIONS='--max_old_space_size=3072' pnpm run rebuild
-
Start the Firefish service and confirm that Firefish is downgraded
sudo systemctl start your-firefish-service.service
Docker/Podman
-
Stop the container
docker-compose down # or podman-compose down
-
Take a backup
-
Revert database migrations
docker-compose exec db psql --command="$(cat docs/downgrade.sql)" --user=user_name --dbname=database_name # or podman-compose exec db psql --command="$(cat docs/revert.sql)" --user=user_name --dbname=database_name
The user and database name can be found in
.config/docker.env
.POSTGRES_PASSWORD=password POSTGRES_USER=user_name # user name POSTGRES_DB=database_name # database name
-
Change Firefish image tag from
latest
tov20240206
vim docker-compose.yml
version: "3" services: web: image: registry.firefish.dev/firefish/firefish:v20240206 # here
-
Change database image from
docker.io/groonga/pgroonga
todocker.io/postgres
Please make sure to use the same PostgreSQL version. For example, if you are using
docker.io/groonga/pgroonga:3.1.8-alpine-16
, you should change it todocker.io/postgres:16-alpine
. PGroonga images are tagged as{PGroonga version}-{alpine or debian}-{PostgreSQL major version}
. PostgreSQL image tags can be found at https://hub.docker.com/_/postgres/tags. -
Start the container and confirm that Firefish is downgraded
docker-compose up --detach # or podman-compose up --detach