Skip to content

chore(docs): Supabase integration docs, and Checkout example#712

Merged
thruflo merged 14 commits into
mainfrom
samwillis/supabase-docs
Dec 1, 2023
Merged

chore(docs): Supabase integration docs, and Checkout example#712
thruflo merged 14 commits into
mainfrom
samwillis/supabase-docs

Conversation

@samwillis
Copy link
Copy Markdown
Contributor

@samwillis samwillis commented Nov 30, 2023

@samwillis samwillis marked this pull request as ready for review November 30, 2023 11:39
Comment thread docs/examples/checkout.md Outdated
Comment thread docs/examples/checkout.md
Comment thread docs/examples/checkout.md Outdated
Comment thread docs/integrations/deployment/supabase.md Outdated
Comment thread docs/integrations/deployment/supabase.md Outdated
Comment thread docs/integrations/deployment/supabase.md Outdated
Comment thread docs/integrations/deployment/supabase.md Outdated
Comment thread docs/integrations/deployment/supabase.md Outdated
Comment thread docs/integrations/deployment/supabase.md Outdated
Comment thread docs/usage/installation/postgres.md Outdated
Comment thread docs/examples/checkout.md Outdated
Comment thread docs/examples/checkout.md Outdated

Next, we configure Electric to connect to Supabase. The [Electric sync service](../../api/service) is available as either a Docker image or Elixir app, and it uses environment variables for configuration.

You must configure Electric to use the `direct_writes` mode for inbound transactions, as Supabase does not support the default inbound `logical_replication` mode. This is configured with the `ELECTRIC_INBOUND_MODE` environment variable.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The setting has been renamed in my PR (but not yet in the canary Docker image).

Suggested change
You must configure Electric to use the `direct_writes` mode for inbound transactions, as Supabase does not support the default inbound `logical_replication` mode. This is configured with the `ELECTRIC_INBOUND_MODE` environment variable.
You must configure Electric to use the `direct_writes` mode for inbound transactions, as Supabase does not support the default inbound `logical_replication` mode. This is configured with the `ELECTRIC_WRITE_TO_PG_MODE` environment variable.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alco any chance of a new canary image? So we can change this var name?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@thruflo pushed a new image and updated the variable name in the docs.


```bash
DATABASE_URL=postgresql://user-name:password@db.your-host.supabase.co:port/database-name
ELECTRIC_INBOUND_MODE=direct_writes
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
ELECTRIC_INBOUND_MODE=direct_writes
ELECTRIC_WRITE_TO_PG_MODE=direct_writes

```bash
docker run \
-e "DATABASE_URL=postgresql://user-name:password@db.your-host.supabase.co:port/database-name" \
-e "ELECTRIC_INBOUND_MODE=direct_writes" \
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
-e "ELECTRIC_INBOUND_MODE=direct_writes" \
-e "ELECTRIC_WRITE_TO_PG_MODE=direct_writes" \

Comment thread docs/integrations/deployment/supabase.md Outdated
Comment thread docs/integrations/deployment/supabase.md Outdated
Comment thread docs/integrations/deployment/supabase.md Outdated
Comment thread docs/integrations/deployment/supabase.md Outdated
@thruflo thruflo merged commit 32680e2 into main Dec 1, 2023
@thruflo thruflo deleted the samwillis/supabase-docs branch December 1, 2023 12:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants