Skip to content

PostgREST and development tools bundled in a single docker container

License

Notifications You must be signed in to change notification settings

technowledgy/pgrst_dev

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pgrst_dev

GitHub Workflow Status GitHub

This images uses pg_dev as a base and adds PostgREST for development. It's considered a drop-in replacement during development, while running the official images of PostgreSQL and PostgREST in production.

Bundled Scripts

Currently, the following helper script is added on top of pg_dev:

  • run_pgrst: Runs postgrest with connection parameters extracted from libpq-style PG* environment variables. The authenticator role defaults to PGUSER, but can be overriden with PGRST_DEV_AUTHENTICATOR.
  • with pgrst: Wrapper around command which makes PostgREST available at localhost:3000 via run_pgrst.

How to use

Mount your source code into the container and run curl with a temporary database and PostgREST instance:

docker run --rm -v "$PWD:/usr/src" tool with pg with sql schema.sql with pgrst curl http://localhost:3000

This will load the schema defined in schema.sql through psql, start PostgREST and then fetch the OpenAPI output from the root endpoint.

About

PostgREST and development tools bundled in a single docker container

Resources

License

Stars

Watchers

Forks

Contributors 4

  •  
  •  
  •  
  •