|
5 | 5 | > [!NOTE]
|
6 | 6 | > Documentation is WIP
|
7 | 7 |
|
8 |
| -## Development |
9 |
| - |
10 |
| -Run the Vite dev server: |
11 |
| - |
12 |
| -```shellscript |
13 |
| -npm run dev |
14 |
| -``` |
15 |
| - |
16 |
| -## Deployment |
17 |
| - |
18 |
| -First, build your app for production: |
19 |
| - |
20 |
| -```sh |
21 |
| -npm run build |
22 |
| -``` |
23 |
| - |
24 |
| -Then run the app in production mode: |
25 |
| - |
26 |
| -```sh |
27 |
| -npm start |
28 |
| -``` |
29 |
| - |
30 |
| -Now you'll need to pick a host to deploy it to. |
31 |
| - |
32 |
| -### DIY |
33 |
| - |
34 |
| -If you're familiar with deploying Node applications, the built-in Remix app server is production-ready. |
35 |
| - |
36 |
| -Make sure to deploy the output of `npm run build` |
37 |
| - |
38 |
| -- `build/server` |
39 |
| -- `build/client` |
| 8 | +## How to run it locally |
| 9 | + |
| 10 | +> [!IMPORTANT] |
| 11 | +> [Install Supabase CLI to self host Supabase](https://supabase.com/docs/guides/local-development/cli/getting-started) |
| 12 | +
|
| 13 | +___ |
| 14 | + |
| 15 | +> [!IMPORTANT] |
| 16 | +> To use GitHub auth, you need to create an OAuth app on GitHub and add the client ID and secret to the `.env` file at the **root** of the project. |
| 17 | +> |
| 18 | +> [Follow the docs](https://supabase.com/docs/guides/auth/social-login/auth-github) |
| 19 | +> |
| 20 | +> ```env |
| 21 | +> SUPABASE_AUTH_GITHUB_CLIENT_ID= |
| 22 | +> SUPABASE_AUTH_GITHUB_SECRET= |
| 23 | +> ``` |
| 24 | +> Once done, you can restart the Supabase project with `supabase stop` and `supabase start`. |
| 25 | +
|
| 26 | +___ |
| 27 | +
|
| 28 | +1. Start Supabase locally with `supabase start` and wait until it's done. |
| 29 | +2. Create a `.env` file with the required variables by running `cp .env.example .env`. It already contains all the required environment variables and their values. |
| 30 | + * NB: `DATABASE_URL_MIGRATE`, on production, it should point to the port `5432` of your db instance. |
| 31 | +3. `npm install` |
| 32 | +4. `cd apps/drizzle-run` |
| 33 | +5. Apply Drizzle migrations `npm run db:server:migration:deploy` |
| 34 | +6. Run `npm run dev` to start the development server |
| 35 | +
|
| 36 | +It's a npm workspace monorepo, everything is linked together so if you make changes to `packages/*`, they will be reflected in the app. |
0 commit comments