Skip to content

Commit 29dd4aa

Browse files
committed
Add gettingstarted.mp4
1 parent 5ff113a commit 29dd4aa

File tree

6 files changed

+10
-25
lines changed

6 files changed

+10
-25
lines changed

compose.yaml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ services:
1010
- postgres_data:/var/lib/postgresql/data:rw
1111
environment:
1212
PGRST_AUTHENTICATOR_PASS: ${PGRST_AUTHENTICATOR_PASS:?} # Included for the migrations to use
13-
PGRST_JWT_SECRET: ${PGRST_JWT_SECRET:?} # Used in initial migration to set JWT secret in db
1413
POSTGRES_DB: app
1514
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:?}
1615
POSTGRES_USER: ${POSTGRES_USER:?}
@@ -30,13 +29,8 @@ services:
3029
postgres:
3130
condition: service_healthy
3231
environment:
33-
PGRST_APP_SETTINGS_JWT_EXP: 3600
34-
PGRST_APP_SETTINGS_JWT_SECRET: ${PGRST_JWT_SECRET:?}
3532
PGRST_DB_ANON_ROLE: anon
36-
PGRST_DB_SCHEMAS: api
3733
PGRST_DB_URI: postgres://authenticator:${PGRST_AUTHENTICATOR_PASS:?}@postgres:5432/app
38-
PGRST_JWT_SECRET: ${PGRST_JWT_SECRET:?}
39-
PGRST_OPENAPI_MODE: ignore-privileges
4034

4135
swagger-ui:
4236
image: swaggerapi/swagger-ui:v5.20.1

docs/assets/getting-started.mp4

26.9 MB
Binary file not shown.

docs/gettingstarted.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# 🚀 Getting Started
22

3+
<video controls width="100%">
4+
<source src="/superstack/assets/getting-started.mp4" type="video/mp4">
5+
Your browser does not support the video tag.
6+
Music: https://www.bensound.com
7+
License code: UZG5X7IWWLQOQEU1
8+
Artist: : Lunar Years
9+
</video>
10+
311
SuperStack uses Docker, so make sure [Docker is
412
installed](https://docs.docker.com/get-docker/) before you begin.
513

docs/psql.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ app=#
2626
You can also run SQL directly from the command line:
2727

2828
```
29-
bin/postgres psql -c 'select * from api.movie;'
29+
bin/postgres psql -c 'select * from movie;'
3030
```
3131

3232
## ⚙️ Customize psql Behavior

example.env

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ PGUSER=admin # Used by psql
55
PGPASS=pass
66

77
# PostgREST
8-
PGRST_JWT_SECRET=your-ultra-secret-jwt-key-123456 # must be at least 32 chars
98
PGRST_AUTHENTICATOR_PASS=pass
109

1110
# Caddy
Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,14 @@
11
-- Initial migrations to setup PostgREST
22

33
-- Set values here to reduce the chance of env vars being logged
4-
\set pgrst_jwt_secret '$PGRST_JWT_SECRET'
54
\set pgrst_authenticator_pass '$PGRST_AUTHENTICATOR_PASS'
65

7-
-- Set the JWT secret in the db - despite it being set in the PGRST_JWT_SECRET
8-
-- env var, this appears to be also required
9-
alter system set pgrst.jwt_secret = :'pgrst_jwt_secret';
10-
116
begin;
127

138
-- Create authenticator and anonymous roles. The authenticator role is used for
149
-- connecting to the database. Anon is for non-authenticated users.
1510
create role authenticator noinherit login password :'pgrst_authenticator_pass';
1611
create role anon;
17-
-- Allow the authenticator role to switch to anon.
18-
grant anon to authenticator;
19-
20-
-- Create the default schema. I'd prefer to let the developer create schemas,
21-
-- but PostgREST won't start without at least one schema in PGRST_DB_SCHEMAS.
22-
create schema api;
23-
comment on schema api is 'SuperStack API
24-
25-
Main API schema for the SuperStack application. Contains all database
26-
functions, views, and tables exposed through PostgREST. Designed for use as a
27-
REST API interface, with endpoints documented via Swagger UI. This schema
28-
defines the public contract between the database and clients.';
12+
grant anon to authenticator; -- Allow authenticator to switch to anon.
2913

3014
commit;

0 commit comments

Comments
 (0)