Fast turbo remote cache server written in Rust

Overview

turbo-repo-remote-cache-rs

Fast turbo remote cache server written in Rust. if you are using turbo and you want to have a self hosted remote cache server this is for you.

  1. It is fast ⚡️ .
  2. It supports multiple object storage provider (s3, gcp, azure, file).

Usage

Binary

  1. Download the latest binary from release page
  2. Copy .env.example to same directory as the binary and rename it to .env.
  3. Edit .env file to your needs (TURBO_TOKENS, BUCKET_NAME are required) please refer to .env.example for more information about required vars for each cloud storage provider.
  4. Run the binary.
./turbo-repo-remote-cache-rs
  1. Provide the url to turbo cli
--team= ">
turbo build --api="http://localhost:4000" --token=<token> --team=<team> 

you can also set teamId and apiUrl .turbo/config.json in the root of your project.

  1. Enjoy your self-hosted remote cache and faster builds 🚀 .

Docker

  1. Create a docker file.
FROM salamaashoush/turbo-remote-cache-rs
ENV PORT=4000
ENV FS_PATH=/tmp
ENV BUCKET_NAME=cache
ENV TURBO_TOKENS="token1,token2,token3"
EXPOSE 4000
CMD ["turbo-remote-cache"]
  1. Build the image.
docker build -t your-image .
  1. Run the image.
docker run -p 4000:4000 -v ./cache:/tmp/cache your-image
  1. Provide the url to turbo cli
--team= ">
turbo build --api="http://localhost:4000" --token=<token> --team=<team> 

you can also set teamId and apiUrl .turbo/config.json in the root of your project.

Environment Variables

all

Required

Name Description Default
TURBO_TOKENS Comma separated list of turbo tokens that are allowed to access the cache. ""
BUCKET_NAME Name of the bucket to store the cache in. "cache"
STORAGE_PROVIDER Storage provider to use. s3, azure, gcs or file "file"

File Storage Provider

Name Description Default
FS_PATH Path to store the cache in. os temp dir

S3 Storage Provider

Name Description Default
AWS_ACCESS_KEY_ID AWS access key id. ""
AWS_SECRET_ACCESS_KEY AWS secret access key. ""
AWS_DEFAULT_REGION AWS region. ""
AWS_ENDPOINT AWS endpoint. ""
AWS_SESSION_TOKEN AWS session token ""
AWS_CONTAINER_CREDENTIALS_RELATIVE_URI AWS bucket endpoint. ""
AWS_ALLOW_HTTP set to “true” to permit HTTP connections without TLS. false
AWS_PROFILE set profile name, requires aws_profile feature enabled ""

Azure Storage Provider

Name Description Default
AZURE_STORAGE_ACCOUNT_NAME storage account name. ""
AZURE_STORAGE_ACCOUNT_KEY storage account master key ""
AZURE_STORAGE_ACCESS_KEY alias for AZURE_STORAGE_ACCOUNT_KEY ""
AZURE_STORAGE_CLIENT_ID client id for service principal authorization ""
AZURE_STORAGE_CLIENT_SECRET client secret for service principal authorization ""
AZURE_STORAGE_TENANT_ID tenant id used in oauth flows ""

GCS Storage Provider

Name Description Default
GOOGLE_SERVICE_ACCOUNT location of service account file ""
GOOGLE_SERVICE_ACCOUNT_PATH (alias) location of service account file ""
SERVICE_ACCOUNT (alias) location of service account file ""
GOOGLE_SERVICE_ACCOUNT_KEY JSON serialized service account key ""
GOOGLE_BUCKET bucket name ""
GOOGLE_BUCKET_NAME (alias) bucket name ""

Todo

  • Support turbo headers x-artifact-duration, x-artifact-tag, x-artifact-client-ci and x-artifact-client-interactive right now those are ignored and they don't affect the cache.
  • Add nx cloud support.
  • Add more advanced authentication support.
  • Maybe having a dashboard to manage teams and projects would be nice.
You might also like...
Mirroring remote repositories to s3 storage, with atomic updates and periodic garbage collection.

rsync-sjtug WIP: This project is still under development, and is not ready for production use. rsync-sjtug is an open-source project designed to provi

Self-Hosted Remote Dev Environment
Self-Hosted Remote Dev Environment

Lapdev Self-hosted remote development enviroment management with ease Lapdev is a self hosted application that spins up remote development environment

Bruteforce connecting to a specific Sea of Thieves server. Useful if you want to be in the same server as your friends.

SoT Server Finder Find which Sea of Thieves server you're connected to. Useful if you want to be in the same server as your friends. Setup Download so

Leptos server signals synced through Server-Sent-Events (SSE)

Leptos Server Sent Events Server signals are leptos signals kept in sync with the server through server-sent-events (SSE). The signals are read-only o

A blazing fast and easy to use TRPC-like server for Rust.

rspc 🚧 Work in progress 🚧 A blazing fast and easy to use TRPC-like server for Rust. Website Example You define a trpc router and attach resolvers to

A fast and lightweight HTTP server implementation in Rust.

server_nano A tiny, fast, and friendly web server written in rust and inspired by express. It uses may to coroutines Usage First, add this to your Car

Minimal and blazing-fast file server. For real, this time.

Zy Minimal and blazing-fast file server. For real, this time. Features Single Page Application support Partial responses (Range support) Cross-Origin

A fast static code analyzer & language server for Python
A fast static code analyzer & language server for Python

pylyzer ⚡ pylyzer is a static code analyzer / language server for Python written in Rust. Installation cargo (rust package manager) cargo install pyly

A fast nostr opengraph server, built on nostrdb and egui.
A fast nostr opengraph server, built on nostrdb and egui.

notecrumbs A nostr opengraph server build on nostrdb, egui, and skia. It renders notes using the CPU in around 50ms. Status WIP! Local note fetching w

Releases(0.2.0)
Owner
Salama Ashoush
I am a tinkerer, I like to learn new stuff and experiment with new ideas and techniques while building Apps and tools with JS for the Web, Desktop, and Mobile
Salama Ashoush
An expressive Rust library for interacting with a cache.

Amnesia An expressive Rust library for interacting with a Cache. Features Driver-Based Architecture: Easily switch between different caching strategie

Miguel Piedrafita 25 Dec 28, 2023
A CLI for extracting libraries from Apple's dyld shared cache file

dyld-shared-cache-extractor As of macOS Big Sur, instead of shipping the system libraries with macOS, Apple ships a generated cache of all built in dy

Keith Smiley 238 Jan 4, 2023
Find and clean heavy build or cache directories.

ProjClean Find and clean heavy build or cache directories. ProjClean finds directories such as node_modules(node), target(rust), build(java) and their

null 42 Sep 25, 2022
Download pdbs from symbol servers and cache locally, parse symbol paths from env vars

symsrv This crate lets you download and cache pdb files from symbol servers, according to the rules from the _NT_SYMBOL_PATH environment variable. It

Markus Stange 6 Sep 15, 2022
Run if inputs have changed, otherwise use cache

Boost Why Boost? Our planet is burning, and everywhere I look I see CI pipelines repeating work that has already been done. Tools such as TurboRepo, N

Stuart Harris 6 Jul 28, 2022
fclicache - File-based Simple CLI Cache

fclicache is a command-line utility that caches the output of resource-intensive commands, enabling faster retrieval of results when the same commands are executed repeatedly within a specified Time-to-Live (TTL) period.

mr-csce 3 Feb 10, 2024
Punic is a remote caching CLI built for Apple's .xcframework

Punic is a remote caching CLI built for Carthage that exclusively supports Apple's .xcframeworks.

Shred Labs 26 Nov 22, 2022
Call is an easy-to-use command tools for remote development.

Call is an easy-to-use command tools for remote development. It helps you to build remote development easily and elegant. It can work with makefile and justfile.

null 21 Dec 14, 2022
Cross-platform binary shims with optional remote fetching.

chim Cross-platform binary shims with optional remote fetching. Quickstart (make an automatic fetching node.js wrapper) Install chim: (see docs for al

Jeff Dickey 10 Jan 1, 2023
A bit like tee, a bit like script, but all with a fake tty. Lets you remote control and watch a process

teetty teetty is a wrapper binary to execute a command in a pty while providing remote control facilities. This allows logging the stdout of a process

Armin Ronacher 259 Jan 3, 2023