File tree 5 files changed +32
-38
lines changed
5 files changed +32
-38
lines changed Original file line number Diff line number Diff line change @@ -136,3 +136,7 @@ dmypy.json
136
136
137
137
# Poetry local config
138
138
poetry.toml
139
+
140
+ # MacOS annoyance
141
+ .DS_Store
142
+ ** /.DS_Store
Original file line number Diff line number Diff line change 1
- version : " 3"
1
+ # docker-compose.yml
2
+ version : ' 3'
2
3
services :
3
- server :
4
- image : postgrest/postgrest
4
+ rest :
5
+ image : postgrest/postgrest:v11.2.2
5
6
ports :
6
- - " 3000:3000"
7
+ - ' 3000:3000'
7
8
environment :
8
- PGRST_DB_URI : postgres://app_user:password@db:5432/app_db
9
- PGRST_DB_SCHEMA : public
10
- PGRST_DB_ANON_ROLE : app_user # In production this role should not be the same as the one used for connection
11
- PGRST_OPENAPI_SERVER_PROXY_URI : " http://127.0.0.1:3000"
9
+ PGRST_DB_URI : postgres://postgres:postgres@infra-db:5432/postgres
10
+ PGRST_DB_SCHEMAS : public,personal
11
+ PGRST_DB_EXTRA_SEARCH_PATH : extensions
12
+ PGRST_DB_ANON_ROLE : postgres
13
+ PGRST_DB_PLAN_ENABLED : 1
14
+ PGRST_DB_TX_END : commit-allow-override
12
15
depends_on :
13
16
- db
14
17
db :
15
- image : postgres
18
+ image : supabase/ postgres:15.1.0.37
16
19
ports :
17
- - " 5432:5432"
18
- environment :
19
- POSTGRES_DB : app_db
20
- POSTGRES_USER : app_user
21
- POSTGRES_PASSWORD : password
22
- # Uncomment this if you want to persist the data. Create your boostrap SQL file in the project root
20
+ - ' 5432:5432'
23
21
volumes :
24
- # - "./pgdata:/var/lib/postgresql/data"
25
- - " ./init.sql:/docker-entrypoint-initdb.d/init.sql"
22
+ - .:/docker-entrypoint-initdb.d/
23
+ environment :
24
+ POSTGRES_DB : postgres
25
+ POSTGRES_USER : postgres
26
+ POSTGRES_PASSWORD : postgres
27
+ POSTGRES_HOST : /var/run/postgresql
28
+ POSTGRES_PORT : 5432
Original file line number Diff line number Diff line change @@ -76,6 +76,3 @@ create or replace function public.list_stored_countries()
76
76
as $function$
77
77
select * from countries;
78
78
$function$;
79
-
80
- alter role authenticator set pgrst .db_plan_enabled to true;
81
- notify pgrst, ' reload config' ;
Original file line number Diff line number Diff line change 1
1
from postgrest import AsyncPostgrestClient
2
2
3
- REST_URL = "https://kzwoknoxuuvryajohvij.supabase.co/rest/v1/"
4
- headers = {}
5
- headers [
6
- "apikey"
7
- ] = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Imt6d29rbm94dXV2cnlham9odmlqIiwicm9sZSI6ImFub24iLCJpYXQiOjE3MDgxOTAxNzgsImV4cCI6MjAyMzc2NjE3OH0.Nz3iqSWRryPmvLpCTb-6tyMe5X4I8NATQmy9xfr13l0"
8
- headers [
9
- "Authorization"
10
- ] = "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Imt6d29rbm94dXV2cnlham9odmlqIiwicm9sZSI6ImFub24iLCJpYXQiOjE3MDgxOTAxNzgsImV4cCI6MjAyMzc2NjE3OH0.Nz3iqSWRryPmvLpCTb-6tyMe5X4I8NATQmy9xfr13l0"
3
+ REST_URL = "http://127.0.0.1:3000"
11
4
12
5
13
6
def rest_client ():
14
- return AsyncPostgrestClient (base_url = REST_URL , headers = headers )
7
+ return AsyncPostgrestClient (
8
+ base_url = REST_URL ,
9
+ )
Original file line number Diff line number Diff line change 1
1
from postgrest import SyncPostgrestClient
2
2
3
- REST_URL = "https://kzwoknoxuuvryajohvij.supabase.co/rest/v1/"
4
- headers = {}
5
- headers [
6
- "apikey"
7
- ] = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Imt6d29rbm94dXV2cnlham9odmlqIiwicm9sZSI6ImFub24iLCJpYXQiOjE3MDgxOTAxNzgsImV4cCI6MjAyMzc2NjE3OH0.Nz3iqSWRryPmvLpCTb-6tyMe5X4I8NATQmy9xfr13l0"
8
- headers [
9
- "Authorization"
10
- ] = "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Imt6d29rbm94dXV2cnlham9odmlqIiwicm9sZSI6ImFub24iLCJpYXQiOjE3MDgxOTAxNzgsImV4cCI6MjAyMzc2NjE3OH0.Nz3iqSWRryPmvLpCTb-6tyMe5X4I8NATQmy9xfr13l0"
3
+ REST_URL = "http://127.0.0.1:3000"
11
4
12
5
13
6
def rest_client ():
14
- return SyncPostgrestClient (base_url = REST_URL , headers = headers )
7
+ return SyncPostgrestClient (
8
+ base_url = REST_URL ,
9
+ )
You can’t perform that action at this time.
0 commit comments