An open-source backend with a Web UI for managing your Turborepo cache.
There are a few open-source turborepo cache backends out there, but all of them seem to lack management around tokens and teams. If you work in an enterprise, access management is crucial for keeping permissions segregated and I could not find anything supporting that.
So I've built my own remote cache. Besides giving you full control over creating teams, issuing tokens for specific teams and who has access to a given token, it also allows you to go from a simple deployment using your file system as artifact storage to going full scale using a S3-compatible backend service.
Here is what is available for you:
- Store artifacts
- Using file system
- Using S3 (Tested with the following)
- Cache busting
- Automatic artifact busting to keep your disk or your S3 bill sane.
- Configurable busting period via environment variable (see
docker-compose.prod.yml
)
- Configurable busting period via environment variable (see
- Automatic artifact busting to keep your disk or your S3 bill sane.
- Management via a Web UI for
- Teams
- Tokens
- User sign-up/sign-in (Will refine this part with more permission controls)
- Whether users can create accounts (Admin settings)
Turbo Racer provides a fully fledged Web UI for managing user accounts, roles and tokens for cache access and segmentation. Below you can see a few screenshots on how it looks like:
Teams | Settings |
---|---|
Tokens | Users |
---|---|
Once you deploy Turbo Racer for the first time, you must create an admin
account. The first account you signup with from the Sign up
Web UI will be the
system admin.
Admins can control whether users can create accounts so they can login and manage teams and tokens.
- Statistics dashboard
Turbo Racer is designed to be deployed with Docker. The simplest way is to use
docker-compose. Have a look at the
docker-compose.prod.yml
in the root directory for an deployment example.
Whenever a new release is out, a new Docker image is built and pushed to Docker
hub.
Here you can find the latest tags:
- Docker at brunojppb/turbo-racer
- Github Container Registry at brunojppb/turbo-racer
You can use our Digital Ocean template to get this running quickly in a droplet.
To run this app locally, you need the following dependencies installed:
- Elixir 1.14 and
Erlang OTP 25
- You can quickly do it with asdf. Once asdf is
installed and then execute
asdf install
within the context of theturbo-racer
directory. It will automatically pick up the right Elixir and Erlang versions defined in the.tool-versions
file at the root of the repo.
- You can quickly do it with asdf. Once asdf is
installed and then execute
- Postgres 14
- The simplest way is to have
Docker installed and run
docker-compose up
. It will start up a Postgres container with a database ready for your dev server and for running tests.
- The simplest way is to have
Docker installed and run
To start your Phoenix server:
- Run
mix setup
to install and setup dependencies - Start Phoenix endpoint with
mix phx.server
or inside IEx withiex -S mix phx.server
Now you can visit localhost:4000
from your browser.
Make sure that the Postgres container is running and execute mix test