Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

338 B
Raw Blame
#!/bin/bash
set -e
set -o pipefail

PGUSER=${PGUSER:=postgres}
PGPASSWORD=${PGPASSWORD:=postgres}
chown -R postgres.postgres "$PGDATA"
pwfile=$(mktemp)
echo "$PGPASSWORD" > $pwfile
chown postgres $pwfile
su postgres -c "$PGBIN/initdb --pgdata=${PGDATA} --username=${PGUSER} --encoding=unicode --auth=trust --pwfile=$pwfile"
rm -f $pwfile