docker-ckan/postgresql/docker-entrypoint-initdb.d/10_create_ckandb.sh

8 lines
258 B
Bash
Raw Normal View History

2024-04-13 08:48:15 +02:00
#!/bin/bash
set -e
psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" <<-EOSQL
CREATE ROLE "$CKAN_DB_USER" NOSUPERUSER CREATEDB CREATEROLE LOGIN PASSWORD '$CKAN_DB_PASSWORD';
CREATE DATABASE "$CKAN_DB" OWNER "$CKAN_DB_USER" ENCODING 'utf-8';
EOSQL