ducktors / turborepo-remote-cache

Open source implementation of the Turborepo custom remote cache server.
https://ducktors.github.io/turborepo-remote-cache/
MIT License
1.01k stars 93 forks source link

Digitalocean spaces support #279

Closed warflash closed 8 months ago

warflash commented 8 months ago

🚀 Feature Proposal

Supporting Digitalocean spaces would be very much appreciated.

Motivation

Currently it seems only the "big" cloud providers are supported where as it seems spaces would be quite a bit cheaper to use as a s3 service

fox1t commented 8 months ago

Good call. Checking their documentation, it says it is s3 compatible. I think it might work out of the box since we support S3-like storage. @warflash, are you able to test it?

warflash commented 8 months ago

@fox1t The issue I'm seeing is that to make requests to spaces you need to somehow add a custom endpoint. https://docs.digitalocean.com/products/spaces/how-to/use-aws-sdks/#configure-a-client

As far as I can tell one can only set the AWS region in the envs of this project but not the entire serviceURL endpoint which spaces does require. Apart from that things should be compatible out of the box

fox1t commented 8 months ago

Awesome! Do you want to open a PR and add this feature?

warflash commented 8 months ago

I looked through the repo and checked on how it could be implemented and noticed that there is support for generic S3 stuff, so I played with it a bit and setting the S3_ENDPOINT and STORAGE_PROVIDER seems to work. Created a PR to document #281