From 3d8481759360d8a8744ac4e4f3ed7d9bdb137b30 Mon Sep 17 00:00:00 2001 From: sn0w Date: Mon, 16 Aug 2021 18:16:54 +0200 Subject: [PATCH] Add note about postgres --- README.md | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index eebe3eb..77911d2 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Pleroma-Docker (Unofficial) -[Pleroma](https://pleroma.social/) is a selfhosted social network that uses OStatus/ActivityPub. +[Pleroma](https://pleroma.social/) is a selfhosted social network that uses ActivityPub. This repository dockerizes it for easier deployment. @@ -17,8 +17,7 @@ This repository dockerizes it for easier deployment. * thermonuclear war, or you getting fired because your boss saw your NSFW posts. * * Please do some research if you have any concerns about the - * included features or software ***before*** using it. - * + * included features or software *before* using it. */ ``` @@ -32,7 +31,7 @@ Take a look at [hosted/pleroma](/hosted/pleroma) if you get stuck or need some i Additionally it's known to run on (in no particular order): - social.interhop.org - social.technodruide.ca -- toot.poto.cafe +- is.badat.dev Does your instance use pleroma-docker?
Let me know and I'll add you to this list. @@ -85,6 +84,26 @@ You can run these tasks in your running pleroma server using `./pleroma.sh mix [ For example: `./pleroma.sh mix pleroma.user new sn0w ...`
If you need to fix bigger problems you can also spawn a shell with `./pleroma.sh enter`. +### Postgres Upgrades + +Postgres upgrades are a slow process in docker (even more than usual) because we can't utilize `pg_upgrade` in any sensible way.
+If you ever wish to upgrade postgres to a new major release for some reason, here's a list of things you'll need to do. + +- Inform your users about the impending downtime + - Seriously this can take anywhere from a couple hours to a week depending on your instance +- Make sure you have enough free disk space or some network drive to dump to, we can't do in-place upgrades +- Stop pleroma (`docker-compose stop server`) +- Dump the current database into an SQL file (`docker-compose exec db pg_dumpall -U pleroma > /my/sql/location/pleroma.sql`) +- Remove the old containers (`docker-compose down`) +- Modify the postgres version in `docker-compose.yml` to your desired release +- Delete `data/db` or move it into some different place (might be handy if you want to abort/revert the migration) +- Start the new postgres container (`docker-compose up -d db`) +- Start the import (`docker-compose exec -T db psql -U pleroma < /my/sql/location/pleroma.sql`) +- Wait for a possibly ridculously long time +- Boot pleroma again (`docker-compose up -d`) +- Wait for service to stabilize while federation catches up +- Done! + ### Customization Add your customizations (and their folder structure) to `custom.d/`.