postgres extension configurable
This commit is contained in:
1 parent
91df4dd690
commit
06a1869bee
2 files changed
+6
-2
No files matched your search
@@ -52,3 +52,4 @@ Available Configuration Parameters
|
|||||||
- **DB_USER**: User to create with access to `DB_DATABASE`
|
- **DB_USER**: User to create with access to `DB_DATABASE`
|
||||||
- **DB_PASSWORD**: Password of `DB_USER`
|
- **DB_PASSWORD**: Password of `DB_USER`
|
||||||
- **BACKUP_SCHEDULE**: If set an SQL dump of the database is created automatically all `15min`, `hourly`, `daily`, `weekly` or `monthly`
|
- **BACKUP_SCHEDULE**: If set an SQL dump of the database is created automatically all `15min`, `hourly`, `daily`, `weekly` or `monthly`
|
||||||
|
- **PG_EXTENSIONS**: List of postgres extensions (only for postgresql)
|
||||||
+5
-2
@@ -90,8 +90,11 @@ postgresql_init() {
|
|||||||
|
|
||||||
psql -h$DB_HOST -p $DB_PORT -U$DB_ROOT_USER -tc "GRANT ALL PRIVILEGES ON DATABASE $DB_DATABASE to $DB_USER;" > /dev/null
|
psql -h$DB_HOST -p $DB_PORT -U$DB_ROOT_USER -tc "GRANT ALL PRIVILEGES ON DATABASE $DB_DATABASE to $DB_USER;" > /dev/null
|
||||||
|
|
||||||
# TODO make this configurable
|
|
||||||
psql -h$DB_HOST -p $DB_PORT -U$DB_ROOT_USER -d $DB_DATABASE -tc "CREATE EXTENSION pg_trgm;" > /dev/null 2> /dev/null || true
|
# add extension
|
||||||
|
if [ -n "$PG_EXTENSIONS" ]; then
|
||||||
|
psql -h$DB_HOST -p $DB_PORT -U$DB_ROOT_USER -d $DB_DATABASE -tc "CREATE EXTENSION $PG_EXTENSIONS;" > /dev/null 2> /dev/null || true
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
postgresql_auto_backup() {
|
postgresql_auto_backup() {
|
||||||
|
|||||||
Reference in new issue
Block a user