diff --git a/init/postgres-init.sh b/init/postgres-init.sh index 10b35e4..733bcf8 100644 --- a/init/postgres-init.sh +++ b/init/postgres-init.sh @@ -23,7 +23,14 @@ ensure_db() { fi } +ensure_extension() { + db="$1" + ext="$2" + psql -d "${db}" -c "CREATE EXTENSION IF NOT EXISTS \"${ext}\";" +} + ensure_role "asxpio" "${ASXPIO_DB_PASSWORD}" ensure_db "asxpio" "asxpio" +ensure_extension "asxpio" "citext" echo "postgres-init: done"