feat: Read config directly from environment variables

resolves #1624
This commit is contained in:
Wolfgang Walther
2020-12-23 19:39:40 +01:00
committed by Wolfgang Walther
parent f2f639e484
commit b7fc393e49
9 changed files with 151 additions and 124 deletions
+2 -7
View File
@@ -94,17 +94,12 @@ let
| ${jq}/bin/jq -r .token
)"
# Plug the default config file into the full description.
defaultConfig="$(cat ${docker.config})"
export DEFAULT_CONFIG="$defaultConfig"
fullDescription="$(${envsubst}/bin/envsubst < ${fullDescription})"
# Patch the full description.
# Patch both descriptions.
responseCode="$(
${curl}/bin/curl -s --write-out "%{response_code}" \
--output /dev/null -H "Authorization: JWT $token" -X PATCH \
--data-urlencode description@${description} \
--data-urlencode "full_description=$fullDescription" \
--data-urlencode full_description@${fullDescription} \
"https://hub.docker.com/v2/repositories/$DOCKER_REPO/postgrest/"
)"
+2 -7
View File
@@ -15,13 +15,8 @@ write from scratch.
To learn how to use this container, see the [PostgREST Docker
documentation](https://postgrest.com/en/stable/install.html#docker).
You can configure the PostgREST image by setting the enviroment variables used
in the default `/etc/postgrest.conf` file or overriding that file. This is the
default configuration file:
```
$DEFAULT_CONFIG
```
You can configure the PostgREST image by setting
[enviroment variables](https://postgrest.org/en/stable/configuration.html).
# How this image is built