ojuso-map/support/postgres/docker-entrypoint-initdb.d/init-user-db.sh
2017-05-21 01:52:58 +02:00

9 lines
233 B
Bash

#!/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