Skip to content

About

No description, website, or topics provided.

Resources

Code of conduct

Security policy

Stars

32 stars

Watchers

2 watching

Forks

Latest commit

 

History

1,180 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Turborepo Remote cache

Self-host your turborepo remote cache powered by React Router

Features

Configuration

USER configuration

  • ADMIN_USERNAME : admin
  • ADMIN_NAME : Admin
  • ADMIN_PASSWORD : turbo
  • ADMIN_EMAIL

Session configuration

  • COOKIE_SECRET : secret used to sign the session cookie. Set it to a long random value (e.g. openssl rand -hex 32): when it is not set, a random secret is generated at startup and users are logged out on every restart
  • COOKIE_NOT_SECURE : set to true only when the app is not served over https

TURBO configuration

Storage configuration

  • STORAGE_TYPE : the type of storage to use (default: fs, options: fs ,s3, azure)

fs (File Storage)

  • STORAGE_FS_PATH : the path where to storage the cache,

s3 (Amazon S3)

  • STORAGE_S3_ACCESS_KEY_ID
  • STORAGE_S3_SECRET_ACCESS_KEY
  • STORAGE_S3_FORCE_PATH_STYLE
  • STORAGE_S3_ENDPOINT
  • STORAGE_S3_REGION
  • STORAGE_S3_SSL_ENABLED
  • STORAGE_S3_BUCKET

azure (Azure blob storage)

  • STORAGE_AZURE_STORAGE_ACCOUNT
  • STORAGE_AZURE_STORAGE_ACCESS_KEY
  • STORAGE_AZURE_STORAGE_CONTAINER

Postgres configuration

  • DATABASE_URL

Repository configuration

//.turbo/config.json
{
  "apiUrl": "http://localhost:8080/turbo/api",
  "loginUrl": "http://localhost:8080/turbo/login"
}

// Link the repository to this remote server caching

npx turbo login
npx turbo link

Development

  • Install dependencies
yarn install
  • Launch a postgres database You can use Docker with the docker-commpose.db.yml file if you want
docker-compose -f docker-compose.db.yml up -d
  • Launch the dev server
yarn dev

This starts your app in development mode, rebuilding assets on file changes.

Deployment

First, build your app for production:

yarn build

Then run the app in production mode:

yarn start

Now you'll need to pick a host to deploy it.

You can also use the Dockerfile

HTTP2 support (e.g. for Google CloudRun)

In some cases you may need to use HTTP/2. To do so set the environment variable USE_HTTP2_NO_TLS=1.

E.g. Google CloudRun will have a payload limit of 32MB if you use HTTP/1.1, but some artifacts may be bigger than that. There is no limit when using HTTP/2.

Make sure to set --use-http2 on cloud run. See https://cloud.google.com/run/docs/configuring/http2

Behind a reverse proxy

If the app runs behind a reverse proxy that terminates HTTPS (Traefik, nginx, a load balancer...), set the environment variable TRUST_PROXY=true. The app then uses the X-Forwarded-Proto and X-Forwarded-Host headers sent by the proxy, so that the OAuth redirect_uri (Azure AD / OIDC login) uses https:// and your public host name.

Only enable it when the app is reachable through the proxy only, since these headers are trusted as-is.

About

No description, website, or topics provided.

Resources

Code of conduct

Security policy

Stars

32 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages