taiga/db/init-taiga-db.sh
2016-04-10 19:21:26 +02:00

10 lines
292 B
Bash
Executable File

#!/bin/bash
set -e
psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" <<-EOSQL
CREATE USER $TAIGA_DB_USER;
CREATE DATABASE $TAIGA_DB_NAME;
GRANT ALL PRIVILEGES ON DATABASE $TAIGA_DB_NAME TO $TAIGA_DB_USER;
ALTER USER $TAIGA_DB_USER WITH PASSWORD '$TAIGA_DB_PASSWORD';
EOSQL