diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d75ea3f9..b8bce28f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -32,6 +32,10 @@ To run the project, open the command line in the project's root directory and en # Initial build of all packages required by the main editor project npm run build + # Start supabase + npm run start:supabase + # to stop docker containers later, run: npm run stop:supabase + # Start the local server npm run start:server diff --git a/package.json b/package.json index 4c9c3671..fb7444e6 100644 --- a/package.json +++ b/package.json @@ -39,6 +39,8 @@ "start-react": "npm run start --workspace=packages/editor", "start:preview": "npm run preview --workspace=packages/editor", "start:server": "npm run dev --workspace=packages/server", + "start:supabase": "npm run start:supabase --workspace=packages/server", + "stop:supabase": "npm run stop:supabase --workspace=packages/server", "prepublishOnly": "npm run test && npm run build" }, "overrides": { diff --git a/packages/server/supabase.sh b/packages/server/supabase.sh index b46e06fb..ea2014e6 100755 --- a/packages/server/supabase.sh +++ b/packages/server/supabase.sh @@ -1,8 +1,11 @@ -#!/bin/bash +#!/usr/bin/env bash # because we don't want to check in the secrets (even though they are staging) # we have to source them from a local file for config.toml to work and then run the supabase command # only necessary for local development, as github actions will have the secrets in env already +if ! test -f .env.local; then + cp .env.local.example .env.local +fi source .env.local export TYPECELL_GOOGLE_OAUTH_SECRET export TYPECELL_GITHUB_OAUTH_SECRET -npx supabase "$@" \ No newline at end of file +npx supabase "$@"