Skip to content

Commit

Permalink
Update to work with cli (#20)
Browse files Browse the repository at this point in the history
Update readme with instructions for production deployment of email templates
Add types back into the project until SvelteKit resolves zero-effort types bug
Add new migration to update the email_confirmed_at in the waiting-list table
Update the github workflow ci pipeline to exclude services on supabase start
  • Loading branch information
silentworks committed Sep 3, 2023
1 parent bf689ea commit 496dc53
Show file tree
Hide file tree
Showing 27 changed files with 760 additions and 506 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
version: latest

- name: Start Supabase local development setup
run: supabase start
run: supabase start -x realtime,storage-api,imgproxy,inbucket,studio,edge-runtime,logflare,vector,pgbouncer

- name: Verify generated types are checked in
run: |
Expand Down
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@ SUPABASE_SERVICE_ROLE_KEY=
CONNECTION_STRING=
```

The "CONNECTION_STRING" can be found inside the Supabase Dashboard by going to [**Settings > Database**](https://app.supabase.com/project/idqjyyqyuxmhbpclxvxq/settings/database) then scrolling down to **Connection string** and clicking on the **URI** tab. You should see a string looking like `postgresql://postgres:[YOUR-PASSWORD]@host:5432/postgres`.
The "CONNECTION_STRING" can be found inside the Supabase Dashboard by going to [**Settings > Database**](https://app.supabase.com/project/_/settings/database) then scrolling down to **Connection string** and clicking on the **URI** tab. You should see a string looking like `postgresql://postgres:[YOUR-PASSWORD]@host:5432/postgres`.

### Run database migrations

```sh
pnpm m:up
pnpm exec supabase migration up
```

### Creating admin user
Expand All @@ -64,7 +64,11 @@ pnpm dev
pnpm dev -- --open
```

## Building
## Production

There are email templates in this project that are used for local development. To update your hosted project, please copy the templates from `supabase/auth/email` into the [Email Templates](https://supabase.com/dashboard/project/_/auth/templates) section of the Dashboard.

### Building

To create a production version of your app:

Expand Down
8 changes: 4 additions & 4 deletions example.env
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
VITE_APP_URL=http://localhost:3000/
VITE_SUPABASE_URL=<url>
VITE_SUPABASE_ANON_KEY=<anon_public>
SUPABASE_SERVICE_ROLE_KEY=<service_role_secret>
CONNECTION_STRING=<connection_string>
VITE_SUPABASE_URL=http://localhost:58721
VITE_SUPABASE_ANON_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZS1kZW1vIiwicm9sZSI6ImFub24iLCJleHAiOjE5ODM4MTI5OTZ9.CRXP1A7WOeoJeXxjNni43kdQwgnWNReilDMblYTn_I0
SUPABASE_SERVICE_ROLE_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZS1kZW1vIiwicm9sZSI6InNlcnZpY2Vfcm9sZSIsImV4cCI6MTk4MzgxMjk5Nn0.EGIM96RAZx35lJzdJsyH-qQwv8Hdp7fsn3W0YpN81IU
CONNECTION_STRING=postgresql://postgres:postgres@localhost:58722/postgres
96 changes: 48 additions & 48 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,49 +1,49 @@
{
"name": "waiting-list",
"version": "0.3.0",
"scripts": {
"dev": "vite dev",
"build": "vite build",
"preview": "vite preview",
"start": "node build/index.js",
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
"lint": "prettier --check --plugin-search-dir=. . && eslint --ignore-path .gitignore .",
"format": "prettier --write --plugin-search-dir=. .",
"m:new": "ley new",
"m:up": "ley up",
"m:down": "ley down",
"m:status": "ley status"
},
"devDependencies": {
"@supabase/supabase-js": "^2.32.0",
"@sveltejs/adapter-node": "^1.3.1",
"@sveltejs/kit": "^1.22.5",
"@types/cookie": "^0.5.1",
"@typescript-eslint/eslint-plugin": "^5.59.7",
"@typescript-eslint/parser": "^5.59.7",
"dotenv": "^16.0.3",
"eslint": "^8.41.0",
"eslint-config-prettier": "^8.8.0",
"eslint-plugin-svelte": "^2.32.4",
"ley": "^0.8.1",
"pg-connection-string": "^2.6.0",
"postgres": "^3.3.4",
"prettier": "~3.0.1",
"prettier-plugin-svelte": "^3.0.3",
"supabase": "1.85.0",
"svelte": "^4.1.2",
"svelte-check": "^3.4.3",
"svelte-preprocess": "^5.0.4",
"sveltekit-flash-message": "^2.1.3",
"tslib": "^2.5.2",
"typescript": "^5.0.4",
"vite": "^4.3.9"
},
"type": "module",
"dependencies": {
"@supabase/auth-helpers-sveltekit": "^0.10.2",
"email-regex": "^5.0.0",
"vest": "^4.6.11"
}
}
"name": "waiting-list",
"version": "0.3.0",
"scripts": {
"dev": "vite dev",
"build": "vite build",
"preview": "vite preview",
"start": "node build/index.js",
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
"lint": "prettier --check --plugin-search-dir=. . && eslint --ignore-path .gitignore .",
"format": "prettier --write --plugin-search-dir=. .",
"m:new": "ley new",
"m:up": "ley up",
"m:down": "ley down",
"m:status": "ley status"
},
"devDependencies": {
"@supabase/supabase-js": "^2.33.1",
"@sveltejs/adapter-node": "^1.3.1",
"@sveltejs/kit": "^1.24.0",
"@types/cookie": "^0.5.1",
"@typescript-eslint/eslint-plugin": "^6.5.0",
"@typescript-eslint/parser": "^6.5.0",
"dotenv": "^16.3.1",
"eslint": "^8.48.0",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-svelte": "^2.33.0",
"ley": "^0.8.1",
"pg-connection-string": "^2.6.2",
"postgres": "^3.3.5",
"prettier": "~3.0.3",
"prettier-plugin-svelte": "^3.0.3",
"supabase": "1.88.0",
"svelte": "^4.2.0",
"svelte-check": "^3.5.1",
"svelte-preprocess": "^5.0.4",
"sveltekit-flash-message": "^2.2.0",
"tslib": "^2.6.2",
"typescript": "^5.2.2",
"vite": "^4.4.9"
},
"type": "module",
"dependencies": {
"@supabase/auth-helpers-sveltekit": "^0.10.2",
"email-regex": "^5.0.0",
"vest": "^4.6.11"
}
}
Loading

0 comments on commit 496dc53

Please sign in to comment.