Merge branch 'master' of github.com:supabase/supabase

This commit is contained in:
Terry Sutton committed 2022-08-12 12:39:11 -02:30
commit 328923cd08
11 files changed
+815 -418

No files matched your search

+161 -130
View File
@@ -1,6 +1,7 @@
---
id: config
title: Configuration
toc_max_heading_level: 2
---
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
@@ -17,19 +18,18 @@ This file is located in the `supabase` folder under `supabase/config.toml`.
## General
### `project_id`
| Parameter | Required | Default |
| :-------- | :------- | :------------------------- |
| `project_id` | `true` | `` |
### `project_id`
A string used to distinguish different Supabase projects on the same host. Defaults to the working directory name when running `supabase init`.
See also:
<ul>
<li>Required: <code>true</code></li>
<li>Default: <code>None</code></li>
</ul>
<br />
@@ -39,53 +39,59 @@ See also:
## API
### `api.port`
| Parameter | Required | Default |
| :-------- | :------- | :------------------------- |
| `api.port` | `true` | `54321` |
### `api.port`
Port to use for the API URL.
See also:
<ul>
<li>Required: <code>true</code></li>
<li>Default: <code>54321</code></li>
<li>
<span>See also:</span>
<ul><li><a href="https://postgrest.org/en/stable/configuration.html">PostgREST configuration</a></li></ul>
</li>
</ul>
- [PostgREST configuration](https://postgrest.org/en/stable/configuration.html)
<br />
### `api.extra_search_path`
| Parameter | Required | Default |
| :-------- | :------- | :------------------------- |
| `api.extra_search_path` | `true` | `["extensions"]` |
Extra schemas to add to the `search_path` of every request.
See also:
<ul>
<li>Required: <code>true</code></li>
<li>Default: <code>["extensions"]</code></li>
<li>
<span>See also:</span>
<ul><li><a href="https://postgrest.org/en/stable/configuration.html">PostgREST configuration</a></li></ul>
</li>
</ul>
- [PostgREST configuration](https://postgrest.org/en/stable/configuration.html)
<br />
### `api.max_rows`
| Parameter | Required | Default |
| :-------- | :------- | :------------------------- |
| `api.max_rows` | `true` | `1000` |
The maximum number of rows returned from a view, table, or stored procedure. Limits payload size for accidental or malicious requests.
See also:
- [PostgREST configuration](https://postgrest.org/en/stable/configuration.html)
<ul>
<li>Required: <code>true</code></li>
<li>Default: <code>1000</code></li>
<li>
<span>See also:</span>
<ul><li><a href="https://postgrest.org/en/stable/configuration.html">PostgREST configuration</a></li></ul>
</li>
</ul>
<br />
@@ -95,37 +101,41 @@ See also:
## Database
### `db.port`
| Parameter | Required | Default |
| :-------- | :------- | :------------------------- |
| `db.port` | `true` | `54322` |
### `db.port`
Port to use for the local database URL.
See also:
<ul>
<li>Required: <code>true</code></li>
<li>Default: <code>54322</code></li>
<li>
<span>See also:</span>
<ul><li><a href="https://postgrest.org/en/stable/configuration.html">PostgreSQL configuration</a></li></ul>
</li>
</ul>
- [PostgreSQL configuration](https://postgrest.org/en/stable/configuration.html)
<br />
### `db.major_version`
| Parameter | Required | Default |
| :-------- | :------- | :------------------------- |
| `db.major_version` | `true` | `14` |
The database major version to use. This has to be the same as your remote database's. Run `SHOW server_version;` on the remote database to check.
See also:
- [PostgreSQL configuration](https://postgrest.org/en/stable/configuration.html)
<ul>
<li>Required: <code>true</code></li>
<li>Default: <code>14</code></li>
<li>
<span>See also:</span>
<ul><li><a href="https://postgrest.org/en/stable/configuration.html">PostgreSQL configuration</a></li></ul>
</li>
</ul>
<br />
@@ -135,19 +145,18 @@ See also:
## Dashboard
### `studio.port`
| Parameter | Required | Default |
| :-------- | :------- | :------------------------- |
| `studio.port` | `true` | `54323` |
### `studio.port`
Port to use for Supabase Studio.
See also:
<ul>
<li>Required: <code>true</code></li>
<li>Default: <code>54323</code></li>
</ul>
<br />
@@ -157,23 +166,25 @@ See also:
## Local Development
### `inbucket.port`
| Parameter | Required | Default |
| :-------- | :------- | :------------------------- |
| `inbucket.port` | `true` | `54324` |
### `inbucket.port`
Port to use for the email testing server web interface.
Emails sent with the local dev setup are not actually sent - rather, they are monitored, and you can view the emails that would have been sent from the web interface.
See also:
- [Inbucket documentation](https://www.inbucket.org)
<ul>
<li>Required: <code>true</code></li>
<li>Default: <code>54324</code></li>
<li>
<span>See also:</span>
<ul><li><a href="https://www.inbucket.org">Inbucket documentation</a></li></ul>
</li>
</ul>
<br />
@@ -183,124 +194,135 @@ See also:
## Auth
### `auth.site_url`
| Parameter | Required | Default |
| :-------- | :------- | :------------------------- |
| `auth.site_url` | `true` | `"http://localhost:3000"` |
### `auth.site_url`
The base URL of your website. Used as an allow-list for redirects and for constructing URLs used in emails.
See also:
<ul>
<li>Required: <code>true</code></li>
<li>Default: <code>"http://localhost:3000"</code></li>
<li>
<span>See also:</span>
<ul><li><a href="https://supabase.com/docs/reference/tools/reference-auth">Auth Server configuration</a></li></ul>
</li>
</ul>
- [Auth Server configuration](https://supabase.com/docs/reference/tools/reference-auth)
<br />
### `auth.additional_redirect_urls`
| Parameter | Required | Default |
| :-------- | :------- | :------------------------- |
| `auth.additional_redirect_urls` | `true` | `["https://localhost:3000"]` |
A list of _exact_ URLs that auth providers are permitted to redirect to post authentication.
See also:
<ul>
<li>Required: <code>true</code></li>
<li>Default: <code>["https://localhost:3000"]</code></li>
<li>
<span>See also:</span>
<ul><li><a href="https://supabase.com/docs/reference/tools/reference-auth">Auth Server configuration</a></li></ul>
</li>
</ul>
- [Auth Server configuration](https://supabase.com/docs/reference/tools/reference-auth)
<br />
### `auth.jwt_expiry`
| Parameter | Required | Default |
| :-------- | :------- | :------------------------- |
| `auth.jwt_expiry` | `true` | `3600` |
How long tokens are valid for, in seconds. Defaults to 3600 (1 hour), maximum 604,800 seconds (one week).
See also:
<ul>
<li>Required: <code>true</code></li>
<li>Default: <code>3600</code></li>
<li>
<span>See also:</span>
<ul><li><a href="https://supabase.com/docs/reference/tools/reference-auth">Auth Server configuration</a></li></ul>
</li>
</ul>
- [Auth Server configuration](https://supabase.com/docs/reference/tools/reference-auth)
<br />
### `auth.enable_signup`
| Parameter | Required | Default |
| :-------- | :------- | :------------------------- |
| `auth.enable_signup` | `true` | `true` |
Allow/disallow new user signups to your project.
See also:
<ul>
<li>Required: <code>true</code></li>
<li>Default: <code>true</code></li>
<li>
<span>See also:</span>
<ul><li><a href="https://supabase.com/docs/reference/tools/reference-auth">Auth Server configuration</a></li></ul>
</li>
</ul>
- [Auth Server configuration](https://supabase.com/docs/reference/tools/reference-auth)
<br />
### `auth.email.enable_signup`
| Parameter | Required | Default |
| :-------- | :------- | :------------------------- |
| `auth.email.enable_signup` | `true` | `true` |
Allow/disallow new user signups via email to your project.
See also:
<ul>
<li>Required: <code>true</code></li>
<li>Default: <code>true</code></li>
<li>
<span>See also:</span>
<ul><li><a href="https://supabase.com/docs/reference/tools/reference-auth">Auth Server configuration</a></li></ul>
</li>
</ul>
- [Auth Server configuration](https://supabase.com/docs/reference/tools/reference-auth)
<br />
### `auth.email.double_confirm_changes`
| Parameter | Required | Default |
| :-------- | :------- | :------------------------- |
| `auth.email.double_confirm_changes` | `true` | `true` |
If enabled, a user will be required to confirm any email change on both the old, and new email addresses. If disabled, only the new email is required to confirm.
See also:
<ul>
<li>Required: <code>true</code></li>
<li>Default: <code>true</code></li>
<li>
<span>See also:</span>
<ul><li><a href="https://supabase.com/docs/reference/tools/reference-auth">Auth Server configuration</a></li></ul>
</li>
</ul>
- [Auth Server configuration](https://supabase.com/docs/reference/tools/reference-auth)
<br />
### `auth.email.enable_confirmations`
| Parameter | Required | Default |
| :-------- | :------- | :------------------------- |
| `auth.email.enable_confirmations` | `true` | `true` |
If enabled, users need to confirm their email address before signing in.
See also:
<ul>
<li>Required: <code>true</code></li>
<li>Default: <code>true</code></li>
<li>
<span>See also:</span>
<ul><li><a href="https://supabase.com/docs/reference/tools/reference-auth">Auth Server configuration</a></li></ul>
</li>
</ul>
- [Auth Server configuration](https://supabase.com/docs/reference/tools/reference-auth)
<br />
### `auth.external.<provider>.enabled`
| Parameter | Required | Default |
| :-------- | :------- | :------------------------- |
| `auth.external.<provider>.enabled` | `true` | `true` |
Use an external OAuth provider. The full list of providers are:
- `apple`
@@ -317,43 +339,52 @@ Use an external OAuth provider. The full list of providers are:
- `spotify`
See also:
<ul>
<li>Required: <code>true</code></li>
<li>Default: <code>true</code></li>
<li>
<span>See also:</span>
<ul><li><a href="https://supabase.com/docs/reference/tools/reference-auth">Auth Server configuration</a></li></ul>
</li>
</ul>
- [Auth Server configuration](https://supabase.com/docs/reference/tools/reference-auth)
<br />
### `auth.external.<provider>.client_id`
| Parameter | Required | Default |
| :-------- | :------- | :------------------------- |
| `auth.external.<provider>.client_id` | `true` | `""` |
Client ID for the external OAuth provider.
See also:
<ul>
<li>Required: <code>true</code></li>
<li>Default: <code>""</code></li>
<li>
<span>See also:</span>
<ul><li><a href="https://supabase.com/docs/reference/tools/reference-auth">Auth Server configuration</a></li></ul>
</li>
</ul>
- [Auth Server configuration](https://supabase.com/docs/reference/tools/reference-auth)
<br />
### `auth.external.<provider>.secret`
| Parameter | Required | Default |
| :-------- | :------- | :------------------------- |
| `auth.external.<provider>.secret` | `true` | `""` |
Client secret for the external OAuth provider.
See also:
<ul>
<li>Required: <code>true</code></li>
<li>Default: <code>""</code></li>
<li>
<span>See also:</span>
<ul><li><a href="https://supabase.com/docs/reference/tools/reference-auth">Auth Server configuration</a></li></ul>
</li>
</ul>
- [Auth Server configuration](https://supabase.com/docs/reference/tools/reference-auth)
<br />
@@ -0,0 +1,70 @@
---
id: installing-and-updating
---
# Installing and Updating
## macOS
### Installing
Available via [Homebrew](https://brew.sh). To install:
```sh
brew install supabase/tap/supabase
```
### Upgrading
To upgrade:
```sh
brew upgrade supabase
```
## Windows
### Installing
Available via [Scoop](https://scoop.sh). To install:
```powershell
scoop bucket add supabase https://github.com/supabase/scoop-bucket.git
scoop install supabase
```
### Upgrading
To upgrade:
```powershell
scoop update supabase
```
## Linux
### Homebrew
Available via [Homebrew](https://brew.sh) and Linux packages.
To install:
```sh
brew install supabase/tap/supabase
```
To upgrade:
```sh
brew upgrade supabase
```
### Linux packages
Linux packages are provided in [Releases](https://github.com/supabase/cli/releases).
To install, download the `.apk`/`.deb`/`.rpm` file depending on your package manager
and run one of the following:
- `sudo apk add --allow-untrusted <...>.apk`
- `sudo dpkg -i <...>.deb`
- `sudo rpm -i <...>.rpm`
+13 -1
View File
@@ -3,8 +3,20 @@ id: intro
slug: /
sidebar_position: 1
sidebar_label: Supabase CLI
hide_table_of_contents: true
---
# Supabase CLI
Manage your Supabase projects.
The Supabase CLI can be found in our [CLI](https://github.com/supabase/cli) repository.
The CLI is still under heavy development, but it will contain all the functionality for working with Supabase projects and the Supabase platform.
- [x] Running Supabase locally
- [x] Self-hosting
- [ ] Managing database migrations (in progress)
- [ ] Pushing your local changes to production
- [ ] Manage your Supabase Account
- [ ] Manage your Supabase Projects
- [ ] Generating types directly from your database schema
- [ ] Generating API and validation schemas from your database
+1 -1
View File
@@ -4,4 +4,4 @@ id: release-notes
# Release Notes
Start your release notes here.
All release notes can be found in the [GitHub Releases page](https://github.com/supabase/cli/releases).
File diff suppressed because it is too large. Load diff
+1
View File
@@ -18,6 +18,7 @@ const sidebars = {
sidebar: [
'intro',
'installing-and-updating',
'usage',
'config',
'release-notes',
+3
View File
@@ -245,6 +245,8 @@
}
.markdown p a,
.markdown p a code,
.markdown li a code,
.markdown li a {
transition: box-shadow 0.1s ease-in-out;
padding-bottom: 2px;
@@ -252,6 +254,7 @@
box-shadow: var(--custom-primary) 0px -3px 0px -1px inset;
}
.markdown p a:hover,
.markdown a:hover code,
.markdown li a:hover {
box-shadow: inset 0 -30px 0 -1px var(--custom-primary);
/* text-shadow: 0px 0px 3px var(--custom-primary-darkest); */
@@ -11,7 +11,7 @@ toc_depth: 3
---
Supabase raised $80M in May, bringing our total funding to $116M. This comes one year after our Series A, and so we're revisiting the plans
we outlined in our [Series A blog post](https://supabase.com/blog/supabase-series-a) and hold ourselves accountable to the promises we made.
we outlined in our [Series A blog post](https://supabase.com/blog/supabase-series-a) tk hold ourselves accountable for the promises we made.
## Where we've been
@@ -19,11 +19,11 @@ We shared a few metrics in our Series A post. Since then we've grown a lot.
### Database growth
At Series A we had launched over 50,000 PostgreSQL databases (only on our hosted platform).
At Series A we'd launched over 50,000 PostgreSQL databases (on our hosted platform).
![Series A databases](/images/blog/series-b/databases-2021.png)
Since then, we've grown to over 150,000 PostgreSQL databases.
As of today, we've launched over 150,000 PostgreSQL databases.
![Series B databases](/images/blog/series-b/databases-2022.png)
+14 -1
View File
@@ -26,7 +26,20 @@ export default async function gen(inputFileName: string, outputDir: string) {
* Versioned Generator
*/
async function gen_v001(spec: CliSpec, dest: string) {
const commands = spec.commands
let commandMap = new Map(spec.commands.map((item) => [item.id, item]))
const commands = spec.commands.map((x) => {
const isChild = x.subcommands.length < 1
const heading = isChild
? `### ${x.summary} {#${x.id}}`
: `## ${x.summary} {#${x.id}}`
return {
...x,
heading,
subcommandList: x.subcommands.map((c) => commandMap.get(c)),
}
})
const content = ejs.render(template, {
info: spec.info,
+18 -8
View File
@@ -2,40 +2,50 @@ const template = `
---
id: usage
title: Usage
toc_max_heading_level: 3
---
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY IF THIS IS VERSION "next" -->
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
<%- info.description %>
<% commands.forEach(function(command){ %>
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY IF THIS IS VERSION "next" -->
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
<br /><br />
## <%- command.summary %> {#<%- command.id %>}
<%- command.heading %>
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
<%- command.description %>
### Usage
<% if(command.usage){ %>
<%- command.usage %>
<% }; %>
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
<% if(command.subcommands.length > 0){ %>
### Available Commands
**Available Commands**
<% command.subcommands.forEach(function(subcommand){ %>
- <a href="#<%- subcommand %>"><%- subcommand %></a>
<% command.subcommandList.forEach(function(subcommand){ %>
- <a href="#<%- subcommand.id %>"><code><%- subcommand.title %></code></a>
<% }); %>
<% } %>
### Options
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
**Options**
<%- command.options %>
<% }); %>
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
`.trim()
export default template
+12 -9
View File
@@ -2,6 +2,7 @@ const template = `
---
id: config
title: Configuration
toc_max_heading_level: 2
---
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
@@ -15,20 +16,22 @@ title: Configuration
## <%= section.title %>
<% section.parameters.forEach(function(parameter){ %>
### \`<%- parameter.title %>\`
| Parameter | Required | Default |
| :-------- | :------- | :------------------------- |
| \`<%- parameter.title %>\` | \`<%= parameter.required %>\` | \`<%- parameter?.default %>\` |
### \`<%- parameter.title %>\`
<%- parameter.description %>
See also:
<% parameter.links?.forEach(function(link){ %>
- [<%- link.name %>](<%- link.link %>)
<% }); %>
<ul>
<li>Required: <code><%= parameter.required %></code></li>
<li>Default: <code><%- parameter?.default ? parameter?.default : 'None' %></code></li><% if(parameter?.links?.length){ %>
<li>
<span>See also:</span>
<ul><% parameter.links?.forEach(function(link){ %><li><a href="<%- link.link %>"><%- link.name %></a></li><% }); %></ul>
</li>
<% } %>
</ul>
<br />
<% }); %>
<% }); %>