API does not match config and DB state #2808
-
QuestionsThree things seem to be wrong about the setup and behaviour described below:
I have restarted, even re-created all containers containers several times, so I guess it can't be about stale schema cache. Would greatly appreciate any help. Setup and BehaviourEnvironment
DatabaseIn my database I have two schemas:
ConfigMy postgrest.conf file contains this:
Which is then mapped to ...
server:
image: postgrest/postgrest
ports:
- "3000:3000"
command: ["postgrest", "config.conf"]
volumes:
- ./postgrest.conf:/config.conf:ro I can confirm that the file is present in the container: $ docker exec -it odin-api-server-1 cat config.conf
db-schemas = "odin"
db-anon-role = "web_anon"
openapi-mode = "follow-privileges" and postgrest is correctly executed with this file as parameter: $ docker exec -it odin-api-server-1 ps -x | grep postgrest
1 ? Ssl 0:03 postgrest config.conf However, postgrest does not pick up the $ docker exec -it odin-api-server-1 postgrest --dump-config
db-anon-role = ""
db-channel = "pgrst"
db-channel-enabled = true
db-extra-search-path = "public"
db-max-rows = ""
db-plan-enabled = false
db-pool = 10
db-pool-acquisition-timeout = 10
db-pool-max-lifetime = 1800
db-pre-request = ""
db-prepared-statements = true
db-root-spec = ""
db-schemas = "public"
db-config = true
db-tx-end = "commit"
db-uri = "postgres://*****:*****@db:5432/odin"
db-use-legacy-gucs = true
jwt-aud = ""
jwt-role-claim-key = ".\"role\""
jwt-secret = "**************"
jwt-secret-is-base64 = false
log-level = "error"
openapi-mode = "follow-privileges"
openapi-security-active = false
openapi-server-proxy-uri = ""
raw-media-types = ""
server-host = "!4"
server-port = 3000
server-trace-header = ""
server-unix-socket = ""
server-unix-socket-mode = "660"
admin-server-port = "" API BehaviourWhen I hit the API |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
I think it is taking the paremeters, but it does not show them in the dump-config because
Related to the previous answer, that's because it is showing the
If it's not a schema cache problem, then maybe the permissions are not set? Verify that you granted any permission on the tables to |
Beta Was this translation helpful? Give feedback.
I think it is taking the paremeters, but it does not show them in the dump-config because
config.conf
was not included. Doing this should show you the correct parameters:Related to the previous answer, that's because it is showing the
odin
schema.If it's not a schema cache problem, then maybe the permissions are not set? Verify that you gran…