Nico Huber | 5d7a1cb | 2023-07-23 19:36:14 +0000 | [diff] [blame] | 1 | #!/bin/sh |
2 | |||||
3 | set -e | ||||
4 | |||||
5 | { | ||||
6 | kc_secret=/tmp/passwd/keycloak/secret | ||||
7 | kc_password=$(cat ${kc_secret}) | ||||
8 | |||||
9 | psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<-EOSQL | ||||
Nico Huber | f4fbab5 | 2023-07-25 10:57:08 +0000 | [diff] [blame^] | 10 | CREATE USER keycloak WITH ENCRYPTED PASSWORD '${kc_password}'; |
11 | CREATE DATABASE keycloak WITH ENCODING='UTF8' OWNER keycloak; | ||||
Nico Huber | 5d7a1cb | 2023-07-23 19:36:14 +0000 | [diff] [blame] | 12 | EOSQL |
13 | } |