Closed t3chguy closed 2 years ago
Can you add a bit of documentation on how to use this via Docker? I'm running the Synapse docker and hope to be able to compress state using this PR.
After building it using something like docker build -t rust-synapse-compress-state .
in a git checkout containing this Dockerfile (and the rest of the repo) there are a couple of ways to use this
Either using docker run + mounting or via docker run sh
I used the former, with something like:
docker run --network root_default -v (pwd):/output -it rust-synapse-compress-state -t -p "host=postgres user=matrix password=PASSWORD dbname=synapse" -r "!ROOMID:server" -o /output/ROOMID.sql
--network
to attach it to my the same internal network as my docker-compose'd Synapse & Postgres
Then from there I applied it to my db using
dc exec -T postgres psql -U postgres synapse < state-compressions/ROOMID.sql
Thanks! I was able to run this, largely following your instructions. Comments for future users:
(pwd)
is actually $(pwd)
dc
means docker-compose
Ah yes, my bad, I lean on my crutches too much (fish-shell and a few aliases)
Simple Dockerfile to not have to install rust/cargo on my Synapse docker host