Sign inSign up

xylonx/s3-synapse

By xylonx

•Updated almost 4 years ago

matrixdotorg/synapse with synapse-s3-storage-provider support

Image
0

1.7K

xylonx/s3-synapse repository overview

⁠s3-synapse

keep track from matrixdotorg/synapse⁠ with synapse-s3-storage-provider⁠ integration.

There are two type of use case:

⁠synapse with s3 storage provider

You can just use is as a normal synapse image. Just add media_storage_providers field in your homeserver.yaml config file and it works :)

⁠cron sync to s3

Thanks for this blog⁠, I add the script he written to the container and extend it.

For docker-compose user, you can use it just like below:

synapse-s3-cron-upload:
  image: xylonx/s3-synapse
  entrypoint: /regular-upload.sh
  environment:
    - PG_USER=
    - PG_PASS=
    - PG_DB=
    - PG_HOST=
    - PG_PORT=
    - REMAIN_TIME=
    - MEDIA_PATH=/data/synapse/media_store/
    - AWS_ACCESS_KEY_ID=
    - AWS_SECRET_ACCESS_KEY=
    - AWS_DEFAULT_REGION=
    - BUCKET=
    - ENDPOINT=
    - WAIT_SECONDS=
  volumes:
    - /path/to/your/synapse/media_store/:/data/synapse/media_store/
  • The PG_ prefix envs specify the connection options to your synpase database.
  • REMAIN_TIME hints how long you want keep file in your local disk. It works as s3_media_upload update-db $REMAIN_TIME
  • MEDIA_PATH specifies the synapse media path. It should match to the target of the volumes directive.
  • The AWS_ prefix envs hint the access info and are used by boto3.
  • BUCKET and ENDPOINT are used by s3_media_upload script determining the uploaded location.
  • WAIT_SECONDS hints the duration between two uploads. It works as sleep $WAIT_SECONDS

If you have any question, you can contact me by :

Tag summary

Content type

Image

Digest

sha256:39965d9c4…

Size

149 MB

Last updated

almost 4 years ago

docker pull xylonx/s3-synapse