0
0
Supabasecloud~10 mins

Self-hosting Supabase - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to start the Supabase Docker container with the correct image tag.

Supabase
docker run -d --name supabase [1]
Drag options to blanks, or click blank then click option'
Asupabase/supabase:edge
Bsupabase/supabase:beta
Csupabase/supabase:stable
Dsupabase/supabase:latest
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'latest' tag which may not be stable
Using 'beta' tag which is for testing
Using 'stable' tag which is not a valid tag
2fill in blank
medium

Complete the command to expose Supabase's Postgres port correctly.

Supabase
docker run -d -p [1]:5432 supabase/supabase:edge
Drag options to blanks, or click blank then click option'
A5432
B5434
C5433
D5435
Attempts:
3 left
💡 Hint
Common Mistakes
Using a different port number that is not mapped correctly
Not exposing the port at all
3fill in blank
hard

Fix the error in the environment variable setting for the Supabase API key.

Supabase
docker run -d -e SUPABASE_API_KEY=[1] supabase/supabase:edge
Drag options to blanks, or click blank then click option'
Amyapikey
B"myapikey"
C'myapikey'
D${myapikey}
Attempts:
3 left
💡 Hint
Common Mistakes
Not quoting the API key causing shell errors
Using single quotes which may not be interpreted correctly
4fill in blank
hard

Fill both blanks to configure Supabase to use a custom Postgres data directory and port.

Supabase
docker run -d -v [1]:/var/lib/postgresql/data -p [2]:5432 supabase/supabase:edge
Drag options to blanks, or click blank then click option'
A/custom/pgdata
B5433
C5432
D/var/lib/postgres/data
Attempts:
3 left
💡 Hint
Common Mistakes
Using the container path instead of host path for volume
Using the default port 5432 when it may be in use
5fill in blank
hard

Fill all three blanks to set environment variables for Supabase's JWT secret, API key, and database URL.

Supabase
docker run -d -e JWT_SECRET=[1] -e SUPABASE_API_KEY=[2] -e DATABASE_URL=[3] supabase/supabase:edge
Drag options to blanks, or click blank then click option'
A"supersecretjwt"
B"apikey123"
C"postgres://user:pass@localhost:5432/dbname"
Dsupersecretjwt
Attempts:
3 left
💡 Hint
Common Mistakes
Not quoting environment variable values
Using incorrect database URL format