Okay, did the migration just now. Everything seems a little more responsive, but I wouldn't call it way faster.
Either way, it wasn't very scary at all. For anybody coming after me:
- add postgres container to compose file like so. I named mine "postgres", added a "postgres" volume, and added it to depends_on for app and cron
- run migration command from nextcloud app container like any other occ command and check admin settings/system for db state:
./occ db:convert-type --password $POSTGRES_PASSWORD --all-apps pgsql $POSTGRES_USER postgres $POSTGRES_DB
- remove old "db" container and volume and all references to it from compose file and run
docker compose up -d --remove-orphans
Here's a cool article I found on Nextcloud performance improvements, and connecting Redis over Unix sockets gave me a more substantial performance improvement than migrating to Postgres. Very happy I fell down this rabbit hole today.
To note if you're following the tutorial in the link above, and for people using the nextcloud:stable container together with the recommended cron container:
config/config.php
, as well asconfig/redis.config.php
/etc/localtime
and/etc/timezone
volumes the app container did, as well as thevolumes_from: tmp