diff --git a/support/postgres/docker-entrypoint-initdb.d/init-user-db.sh b/support/postgres/docker-entrypoint-initdb.d/init-user-db.sh new file mode 100644 index 0000000..6a8aa81 --- /dev/null +++ b/support/postgres/docker-entrypoint-initdb.d/init-user-db.sh @@ -0,0 +1,8 @@ +#!/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