risotto/docker/postgres-init/postgres.init.sh

10 lines
259 B
Bash
Executable File

#!/bin/bash
set -e
psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" -h localhost <<-EOSQL
CREATE ROLE risotto WITH LOGIN PASSWORD 'risotto';
CREATE DATABASE risotto;
GRANT ALL ON DATABASE risotto TO risotto;
CREATE EXTENSION hstore;
EOSQL