夏日幽灵 サマーゴースト (2021)
89 字
1 分钟
postgrest
version: '3'
services:
server:
image: postgrest/postgrest
ports:
- "3000:3000"
environment:
PGRST_DB_URI: postgres://user:password@db:5432/database
PGRST_OPENAPI_SERVER_PROXY_URI: http://127.0.0.1:3000
PGRST_DB_ANON_ROLE: anon
PGRST_DB_SCHEMA: public
PGRST_JWT_SECRET: `openssl rand -base64 32`
然后创建Role
create user anon;
grant usage on schema public to anon;
grant select on all tables in schema public to anon;
create user admin;
grant usage on schema public to admin;
grant select, insert, update, delete on all tables in schema public to admin;
然后Auth BearToken
注意postgrest特定的操作符eq
等
后面待补