Skip to content

drizzle-team/drizzle-flyio-litefs

Repository files navigation

Example project for Drizzle LiteFS SQLite package
Subscribe to our updates on Twitter!

Initial project setup

To setup Fly.io LiteFS app - please refer to official fly.io docs and LiteFS docs

Update your fly.toml

name = "YOU PROJECT NAME"
## ...

[mounts]
  destination = "/mnt/sqlite"
  ## fly mounts create mount_name
  source = "YOUR SOURCE NAME"

## ...

Quick start

## install dependencies
npm i

## install fly cli - https://fly.io/docs/flyctl/installing/
fly login

## launch fly app
fly launch

## create fly volume
fly volumes create source_name

## deploy changes
fly deploy

## need multi regional scale?
## create volume in different region
fly volumes create source_name
## config scaling for your app
fly scale count 2 --max-per-region=1

To automatically generate SQL migrations

npm run generate