forked from dokku/dokku-mysql
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config
23 lines (21 loc) · 763 Bytes
/
config
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/usr/bin/env bash
export MYSQL_IMAGE=${MYSQL_IMAGE:="mysql"}
export MYSQL_IMAGE_VERSION=${MYSQL_IMAGE_VERSION:="5.7.12"}
export MYSQL_ROOT=${MYSQL_ROOT:="/var/lib/dokku/services/mysql"}
export PLUGIN_COMMAND_PREFIX="mysql"
export PLUGIN_DATA_ROOT=$MYSQL_ROOT
export PLUGIN_DATASTORE_PORTS=(3306)
export PLUGIN_DATASTORE_WAIT_PORT=3306
export PLUGIN_DEFAULT_ALIAS="DATABASE"
export PLUGIN_ALT_ALIAS="DOKKU_MYSQL"
export PLUGIN_IMAGE=$MYSQL_IMAGE
export PLUGIN_IMAGE_VERSION=$MYSQL_IMAGE_VERSION
export PLUGIN_SCHEME="mysql"
export PLUGIN_SERVICE="MySQL"
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