Add note about postgres

This commit is contained in:
sn0w 2021-08-16 18:16:54 +02:00
parent 65fe5d85c2
commit 3d84817593
No known key found for this signature in database
GPG Key ID: 9A3716D1EE03D1A9

View File

@ -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?<br/>
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 ...`<br/>
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.<br/>
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/`.<br/>