Browse Source

Add note about postgres

sn0w 2 months ago
No known key found for this signature in database GPG Key ID: 9A3716D1EE03D1A9
1 changed files with 23 additions and 4 deletions
  1. +23

+ 23
- 4 View File

@ -1,6 +1,6 @@
# Pleroma-Docker (Unofficial)
[Pleroma]( is a selfhosted social network that uses OStatus/ActivityPub.
[Pleroma]( 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):
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 `./ mix [
For example: `./ mix pleroma.user new sn0w ...`<br/>
If you need to fix bigger problems you can also spawn a shell with `./ 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/>