litestream-ruby icon indicating copy to clipboard operation
litestream-ruby copied to clipboard

Support configuring replica region and endpoint

Open MatheusRich opened this issue 1 year ago • 1 comments

I'm trying to setup replication using Hetzner's Object Storage, but the default S3 options won't work.

LMK if there's another way around this and if this isn't necessary.

MatheusRich avatar Jan 06 '25 21:01 MatheusRich

I ran into a similar issue with R2 where (unless mistaken) I needed to provide the endpoint

as a temporary solution I assign the env variable in the initializer

ENV["LITESTREAM_REPLICA_ENDPOINT"] = litestream_credentials&.replica_endpoint

and use it in litestream.yml

- path: storage/staging_rubyvideo.sqlite3
    replicas:
      - type: s3
        endpoint: $LITESTREAM_REPLICA_ENDPOINT
        bucket: $LITESTREAM_REPLICA_BUCKET
        path: storage/staging_rubyvideo.sqlite3
        access-key-id: $LITESTREAM_REPLICA_ACCESS_KEY_ID
        secret-access-key: $LITESTREAM_REPLICA_SECRET_ACCESS_KEY

adrienpoly avatar Feb 24 '25 07:02 adrienpoly