ojuso-map/support/postgres/docker-entrypoint-initdb.d/init-user-db.sh

9 lines
233 B
Bash
Raw Normal View History

2017-05-20 23:52:58 +00:00
#!/bin/bash
set -e
psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" <<-EOSQL
CREATE USER weblate WITH PASSWORD '$POSTGRES_PASSWORD';
CREATE DATABASE weblate;
GRANT ALL PRIVILEGES ON DATABASE weblate TO weblate;
EOSQL