Skip to content

Commit 878a201

Browse files
Add initial docs for moon
1 parent 72b75e9 commit 878a201

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

content/cache/reference/moonrepo.mdx

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
---
2+
title: moonrepo
3+
ogTitle: Remote caching for moonrepo builds
4+
description: Learn how to use Depot remote caching for moonrepo builds
5+
---
6+
7+
[**moonrepo**](https://moonrepo.dev/) is a repository management, organization, orchestration, and notification tool for the web ecosystem, written in Rust. Many of the concepts within moon are heavily inspired from Bazel and other popular build systems.
8+
9+
[**Depot Cache**](/docs/cache/overview) provides a remote cache service that can be used with moonrepo, allowing you to incrementally cache and reuse parts of your builds. This cache is accessible from anywhere, both on your local machine and on CI/CD systems.
10+
11+
## Configuring moonrepo to use Depot Cache
12+
13+
Depot Cache can be used with moonrepo from Depot's managed GitHub Actions runners, from your local machine, or from any CI/CD system.
14+
15+
To configure `moon` to use Depot Cache, you will need to set a `DEPOT_TOKEN` environment variable with an organization or user token and add the following to your `.moon/workspace.yml` file:
16+
17+
```yaml
18+
unstable_remote:
19+
host: 'grpcs://cache.depot.dev'
20+
auth:
21+
token: 'DEPOT_TOKEN'
22+
```
23+
24+
If you are using a user token and are a member of more than one organization, you will additionally need to set an `X-Depot-Org` header to your Depot organization ID in `.moon/workspace.yml`:
25+
26+
```yaml
27+
unstable_remote:
28+
host: 'grpcs://cache.depot.dev'
29+
auth:
30+
token: 'DEPOT_TOKEN'
31+
headers:
32+
'X-Depot-Org': '<your-org-id>'
33+
```
34+
35+
See [moonrepo's remote cache documentation](https://moonrepo.dev/docs/guides/remote-cache#cloud-hosted-depot) for more details.
36+
37+
## Using Depot Cache with moonrepo
38+
39+
Once moonrepo is configured to use Depot Cache, you can then run your builds as you normally would. moonrepo will automatically communicate with Depot Cache to fetch and reuse any stored build artifacts from your previous builds.

0 commit comments

Comments
 (0)