https://github.com/mfa/ax-supabase-fly
write AX webhook into supabase using fly.io
https://github.com/mfa/ax-supabase-fly
Last synced: 11 months ago
JSON representation
write AX webhook into supabase using fly.io
- Host: GitHub
- URL: https://github.com/mfa/ax-supabase-fly
- Owner: mfa
- Created: 2023-01-22T14:08:02.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-01-22T18:09:29.000Z (over 3 years ago)
- Last Synced: 2025-02-07T14:22:45.403Z (over 1 year ago)
- Language: Python
- Homepage:
- Size: 2.93 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
## ax-supabase
store the webhook from AX in supabase
this demo uses Flask and is deployed on fly.io
### setup
Create a table in supabase named "generated" and add the following fields (keep `id` and `created_at`):
```
document_id: uuid
uid: text
text: text
text_modified: timestamp without time zone
collection_id: int8
collection_name: text
language: varchar
html: text
html_axite: text
```
create a fly app with `fly launch`
add secrets (get them from your supabase project api settings):
```
flyctl secrets set SUPABASE_URL=my-url-to-my-awesome-supabase-instance
flyctl secrets set SUPABASE_KEY=my-supa-dupa-secret-supabase-api-key
```
and the webhook secret from AX:
```
flyctl secrets set AX_WEBHOOK_SECRET=copy-from-collection-settings-and-set-url-too
```
### deploy
```
flyctl deploy
```
### development
```
python -m pip install -r requirements.txt
FLASK_APP=app.main flask run
```