From dc1f00f5f0f4b9c14b811d6e0eeb93d7927ab4ef Mon Sep 17 00:00:00 2001 From: "Manu [tennox]" Date: Tue, 19 Dec 2023 09:50:50 +0000 Subject: [PATCH] add supabase to instructions & improve shebang --- CONTRIBUTING.md | 4 ++++ package.json | 2 ++ packages/server/supabase.sh | 7 +++++-- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d75ea3f9b..b8bce28f0 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 4c9c36718..fb7444e64 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 b46e06fb7..ea2014e69 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 "$@"