onprem-deploy/ external_ports_config_http/postgres/init-keycloak-db.sh

8 lines
265 B
Bash
Raw Normal View History

2024-05-12 19:50:37 +00:00
#!/bin/bash
set -e
psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<-EOSQL
CREATE DATABASE keycloak;
CREATE USER ${KC_DB_USERNAME} WITH PASSWORD '${KC_DB_PASSWORD}';
GRANT ALL PRIVILEGES ON DATABASE keycloak TO ${KC_DB_USERNAME};
EOSQL