Files
supabase/docker/README.md
T
Paul Copplestone 913add2e3c Adds the docker setup
A bit earlier than expected, so the documentation isn't there, but for now we will add the basic structure and then iterate later.
2021-01-28 13:19:57 +08:00

28 lines
852 B
Markdown

## Docker
You can emulate Supabase using `docker-compose` by following these steps inside the `./docker` folder.
- Starting the emulator: `docker-compose up -d`
- Stopping the emulator: `docker-compose down`
**Usage**
```js
import { createClient } from '@supabase/supabase-js'
const SUPABASE_URL = 'http://localhost:8000'
const SUPABASE_KEY = 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJzdXBhYmFzZSIsImlhdCI6MTYwMzk2ODgzNCwiZXhwIjoyNTUwNjUzNjM0LCJhdWQiOiIiLCJzdWIiOiIiLCJSb2xlIjoicG9zdGdyZXMifQ.kdRWxJKxqgFOlx4BZQj-GIIOEeMILqUvdHMh8ebcn8M'
const supabase = createClient(SUPABASE_URL, SUPABASE_KEY)
```
Accessing the services directly:
- Kong: http://localhost:8000
- GoTrue: http://localhost:8000/auth/v1/
- PostgREST: http://localhost:8000/rest/v1/
- Realtime: http://localhost:8000/realtime/v1/
- Postgres: http://localhost:5432