-
-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Demo a local daemonized cache with turborepo #475
Open
NullVoxPopuli
wants to merge
10
commits into
main
Choose a base branch
from
local-daemoned-cache
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 7 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
ff9e113
Add pm2 to workspace packages
NullVoxPopuli faad08f
Setup and document how to use the daemon
NullVoxPopuli 81358f1
Add the .env.turbo, nothing secret here
NullVoxPopuli 3bb26a9
Add reset script for quickly clearing deps and cache
NullVoxPopuli 15e26fc
Add status and stop scripts
NullVoxPopuli 9e61e72
Add remote cache config
NullVoxPopuli 5a1c4e7
Team ID must start with team_
NullVoxPopuli c66a4e8
Demonstrate wrapping daemon management for the CLI-user
NullVoxPopuli b13bb93
Use released package of turborepo-remote-cache
NullVoxPopuli 93a56ae
set -a is required
NullVoxPopuli File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
PORT=12123 | ||
TURBO_TOKEN=example-token-for-turbo | ||
|
||
# can also be s3 | ||
STORAGE_PROVIDER=local | ||
STORAGE_PATH=/tmp/limber-turbo | ||
|
||
# required of STORAGE_PROVIDER is s3 | ||
S3_ACCESS_KEY= | ||
S3_SECRET_KEY= | ||
S3_REGION= | ||
S3_ENDPOINT= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"teamId": "team_my-fake-but-local-team", | ||
"apiUrl": "http://localhost:12123" | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/bin/sh | ||
|
||
# can also be ran without docker | ||
# as the original project is written | ||
# in typescript | ||
# - node | ||
# - Fastify: https://www.fastify.io/ | ||
|
||
# On my test system, I didn't feel like setting up docker | ||
# docker run \ | ||
# --env-file=.env.turbo \ | ||
# -p 3000:13000 \ | ||
# fox1t/turborepo-remote-cache | ||
|
||
# This runs directly from a git clone (node) | ||
# Before running this, | ||
# - clone the repo | ||
# - npm install | ||
# - npm run prebuild | ||
# - npm run build | ||
(\ | ||
set -a \ | ||
&& . ./.env.turbo \ | ||
&& ( cd ../turborepo-remote-cache && npm run start ) \ | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,10 @@ | |
"tests" | ||
], | ||
"scripts": { | ||
"daemon": "pm2 start ./launch-daemon.sh", | ||
"daemon:status": "pm2 ls", | ||
"daemon:stop": "pm2 stop ./launch-daemon.sh", | ||
"reset": "git clean -Xfd && pnpm install", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. reset, before I learned |
||
"predeploy": "turbo run build --filter=limber", | ||
"build": "turbo run build --filter=limber^...", | ||
"lint": "turbo run lint", | ||
|
@@ -21,6 +25,7 @@ | |
}, | ||
"devDependencies": { | ||
"concurrently": "^7.0.0", | ||
"pm2": "^5.2.0", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
"turbo": "^1.2.5" | ||
}, | ||
"resolutions": { | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
per the docs, the
teamId
must begin withteam_