Skip to content

promer94/turbocache

Repository files navigation

Turbocache

About The Project

Turbocache is an open-source remote cache server for Turborepo. It's only built for learning purpose and demostration. For production work, you should use vercel's offcial remote cache server.

Deploy with Vercel

Deploy with Vercel

Getting Started

Get Environment Variables

rename .env.example.local to .env.local

# Get this from PlantScale
# Tutorial https://www.youtube.com/watch?v=Sx4pFi0je5w
DATABASE_URL=

# AWS S3 Config
AWS_ACCESSKEY_ID=
AWS_ACCESSKEY_TOKEN=
AWS_S3_BUCKET=
AWS_S3_REGION=

# NextAuth
NEXTAUTH_SECRET=
NEXTAUTH_URL=

# Github Oauth
# Tutorial: https://www.youtube.com/watch?v=zvoW8SM-wns
GITHUB_SECRET=
GITHUB_ID=

Installation

pnpm install

Setup mysql (optional)

docker run --name mysql -d -e MYSQL_ROOT_PASSWORD=password -p 3306:3306 arm64v8/mysql:oracle

Setup minio (optional)

docker run \
   -d \
   -p 9000:9000 \
   -p 9001:9001 \
   --name minio \
   -e "MINIO_ROOT_USER=AKIAIOSFODNN7EXAMPLE" \
   -e "MINIO_ROOT_PASSWORD=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY" \
   quay.io/minio/minio server /data --console-address ":9001"

Setup butket for minin (optional)

pnpm bucket

Setup Database

pnpx prisma db push

Generate Prisma Client

pnpx prisma generate

Development

pnpm dev

Deployment

pnpm deploy

Built With


Vercel