Open-source status page, incident response and uptime monitoring
TypeScript alertingincident-managementmcpmcp-servermonitoringmonitoring-as-codeobservabilityon-callopen-sourcesrestatus-pagestatuspagesynthetic-monitoringterraformtinybirdtursouptimeuptime-checkeruptime-monitor
chore: typo
mxkaske072acbc3535a
diff --git a/README.md b/README.mdindex 91c709db7..d396cd85d 100644--- a/README.md+++ b/README.md@@ -69,15 +69,18 @@ email at [[email protected]](mailto:[email protected]) <br/> or <br/>3. Set up your .env file- from `apps/web` and `packages/db` you will find .env.example create your own+ from `apps/web` and `packages/db` you will find .env.example create your own.-4. Start the development server+4. Follow the steps to run your sqlite database locally inside of+ [README.md](https://github.com/openstatusHQ/openstatus/packages/db/README.md)++5. Start the development server```shpnpm dev```-5. Open [http://localhost:3000](http://localhost:3000) with your browser to see+6. Open [http://localhost:3000](http://localhost:3000) with your browser to seethe result.For [clerk](https://clerk.com), you will need to create a webhook endpoint. Todiff --git a/apps/web/.env.example b/apps/web/.env.exampleindex 741b1f334..297f27ba5 100644--- a/apps/web/.env.example+++ b/apps/web/.env.example@@ -23,8 +23,9 @@ UPSTASH_REDIS_REST_TOKEN=test# TINY BIRD for time series data (trackers)TINY_BIRD_API_KEY=tiny-bird-api-key-# PlanetScale ( or a local mysql database)-DATABASE_URL='mysql://root:password@localhost:3306/openstatus'+# TURSO SQLITE+DATABASE_URL=http://127.0.0.1:8080+DATABASE_AUTH_TOKEN=any-token# Solves 'UNABLE_TO_GET_ISSUER_CERT_LOCALLY', see https://github.com/nextauthjs/next-auth/issues/3580# NODE_TLS_REJECT_UNAUTHORIZED="0"diff --git a/packages/db/.env.example b/packages/db/.env.exampleindex 0b4ea3edb..b8233ade6 100644--- a/packages/db/.env.example+++ b/packages/db/.env.example@@ -1 +1,2 @@-DATABASE_URL="planetscale-url"+DATABASE_URL=http://127.0.0.1:8080+DATABASE_AUTH_TOKEN=any-token\ No newline at end of filediff --git a/packages/db/README.md b/packages/db/README.mdindex bfcfe1934..7770cab0e 100644--- a/packages/db/README.md+++ b/packages/db/README.md@@ -1,9 +1,50 @@# DB-Our database package+We are using [turso](https://turso.tech) and sqlite as database to store+user/page/monitor settings. The timeseries data is stored in a+[tinybird](https://tinybird.co) datasource (built on top of ClickHouse).-## Getting started+## Local Development-1. Create you mysql database or use planetscale-2. Update your .env file with DATABASE_URL=""-3. Run `pnpm push` to push the tables+Install the [Turso CLI](https://docs.turso.tech/reference/turso-cli).++For local environment, first+[install sqld](https://github.com/libsql/sqld/blob/main/docs/BUILD-RUN.md).++When installing with Homebrew, follow:++```bash+$ brew tap libsql/sqld+$ brew install sqld-beta+$ sqld --help+```++If you want to keep your database locally, run:++```bash+$ turso dev --db-file openstatus.db+```++It will create a local database in the directory you run the command.++Add the environment variables to inside of the `.env` file in both projects, the+`/apps/web` and `/packages/db`:++```env+DATABASE_URL=http://127.0.0.1:8080+DATABASE_AUTH_TOKEN=any-token # no need to change token+```++Start the migration script inside of `/packages/db` to have the database schema+up to date:++```bash+$ pnpm migrate+```++You should be ready to go! Check out the Drizzle Studio to see if your tables+have been created:++```$+$ pnpm studio+```