postgrest-docs icon indicating copy to clipboard operation
postgrest-docs copied to clipboard

A second PostgREST-and-data instance, need for instructions in the Guide

Open ppKrauss opened this issue 5 years ago • 1 comments

The Guide says nothing about multiple databases (multiple instances of PostgREST). A typical implementation is one instance for production and another for testing.

PS: for some purposes, it is indifferent to use a second SQL scheme or a second SQL database, so in the same place in the Guide it is also necessary to say also (after new PostgREST version with issue PostgREST/postgrest#1106), that an alternative is to configure multiple schemas.

Environment

  • PostgreSQL version: any
  • PostgREST version: 6
  • Operating system: Linux

Description of issue

Expected behavior: a Guide with explanations about multiple instances (each with different database) in the PostgREST/Docker implementation. Also, in the same place, about multiple schemas (when next PostgREST version ok).

Actual behavior: no clues, no instructions (!).


Steps to reproduce two-instances the configuration:

  1. first docker at port 3000 using database testing0.
    docker run -d --net=host -p 3000:3000 -e PGRST_DB_URI="postgres://postgres@localhost/testing0" -e PGRST_DB_ANON_ROLE="postgres" postgrest/postgrest

  2. second docker at port 3002 using database production2
    docker run --d --net=host -p 3002:3002 -e PGRST_SERVER_PORT="3002" -e PGRST_DB_URI="postgres://postgres@localhost/production2" -e PGRST_DB_ANON_ROLE="postgres" postgrest/postgrest

Note: the -p seems reduntant (can be excluded?) with --net=host.

ppKrauss avatar Jan 30 '20 18:01 ppKrauss

Hi all, the issue was edited, now ok.

ppKrauss avatar Jan 31 '20 12:01 ppKrauss

Documenting how to run multiple instances of PostgREST would come naturally with https://github.com/PostgREST/postgrest-docs/issues/69, so closing as duplicate.

wolfgangwalther avatar Feb 18 '24 13:02 wolfgangwalther