Skip to content

Latest commit

 

History

History
124 lines (84 loc) · 2.93 KB

README.md

File metadata and controls

124 lines (84 loc) · 2.93 KB

Turborepo Remote cache

Self-host your turborepo remote cache powerred by Remix

Features

Configuration

USER configuration

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

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
  • Launche the remix 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