forked from dokku/dokku-postgres
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config
30 lines (28 loc) · 1.18 KB
/
config
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/usr/bin/env bash
export POSTGRES_IMAGE=${POSTGRES_IMAGE:="postgres"}
export POSTGRES_IMAGE_VERSION=${POSTGRES_IMAGE_VERSION:="10.4"}
export POSTGRES_ROOT=${POSTGRES_ROOT:="/var/lib/dokku/services/postgres"}
export POSTGRES_HOST_ROOT=${POSTGRES_HOST_ROOT:=$POSTGRES_ROOT}
export PLUGIN_UNIMPLEMENTED_SUBCOMMANDS=()
export PLUGIN_COMMAND_PREFIX="postgres"
export PLUGIN_CONFIG_ROOT=${PLUGIN_CONFIG_ROOT:="$DOKKU_LIB_ROOT/config/$PLUGIN_COMMAND_PREFIX"}
export PLUGIN_DATA_ROOT=$POSTGRES_ROOT
export PLUGIN_DATA_HOST_ROOT=$POSTGRES_HOST_ROOT
export PLUGIN_DATASTORE_PORTS=(5432)
export PLUGIN_DATASTORE_WAIT_PORT=5432
export PLUGIN_DEFAULT_ALIAS="DATABASE"
export PLUGIN_DISABLE_PULL=${POSTGRES_DISABLE_PULL:=}
export PLUGIN_DISABLE_PULL_VARIABLE="POSTGRES_DISABLE_PULL"
export PLUGIN_ALT_ALIAS="DOKKU_POSTGRES"
export PLUGIN_IMAGE=$POSTGRES_IMAGE
export PLUGIN_IMAGE_VERSION=$POSTGRES_IMAGE_VERSION
export PLUGIN_SCHEME="postgres"
export PLUGIN_SERVICE="Postgres"
export PLUGIN_VARIABLE="POSTGRES"
export PLUGIN_BASE_PATH="$PLUGIN_PATH"
if [[ -n $DOKKU_API_VERSION ]]; then
export PLUGIN_BASE_PATH="$PLUGIN_ENABLED_PATH"
fi
if [[ -d "$PLUGIN_DATA_ROOT/*" ]]; then
rm -rf "${PLUGIN_DATA_ROOT:?}/*"
fi