https://github.com/rhubarbgroup/postgrest-heroku
https://github.com/rhubarbgroup/postgrest-heroku
heroku postgresql postgrest
Last synced: 25 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/rhubarbgroup/postgrest-heroku
- Owner: rhubarbgroup
- Created: 2021-10-21T19:24:04.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2021-10-23T04:46:28.000Z (over 4 years ago)
- Last Synced: 2025-02-25T22:46:58.776Z (over 1 year ago)
- Topics: heroku, postgresql, postgrest
- Language: Dockerfile
- Homepage:
- Size: 2.93 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# PostgREST Heroku
Run [PostgREST](https://postgrest.org) on [Heroku](https://heroku.com) behind Nginx and Basic HTTP authentication.
## Getting started
First, clone this repository:
```bash
git clone git@github.com:rhubarbgroup/postgrest-heroku.git
```
Next, create a new app on Heroku:
```bash
heroku create [APP] # --region=us --team=[TEAM]
heroku stack:set container
heroku addons:create heroku-postgresql:hobby-dev
heroku config:set AUTH_USER=picard
heroku config:set AUTH_PASS=Picard-Epsilon-7-9-3
```
Push the code to the Heroku repo:
```bash
git push heroku main
```
Now go test your PostgREST app:
```bash
heroku open
```
## Configuration
The Heroku app will have the following Config Vars:
- `AUTH_USER`: The basic auth user (default: `admin`)
- `AUTH_PASS`: The basic auth password (default: `password`)
- `DATABASE_URL`: The connection PostgreSQL URL
- `PGRST_DB_POOL`: Number of connections to keep open in the pool (default: `10`)
- `PGRST_DB_SCHEMA`: The database schema to expose to REST clients (default `public`)
There is no `DB_ANON_USER` and `DB_URI`, we're using Heroku's `DATABASE_URL`.
## Development
The `docker-compose.yml` can be used to run everything locally at `http://localhost:8080/`:
```
docker-compose up --build --force-recreate
```