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
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
add missing schema_cache.yml and structure.sql
Markus Kahl3dffd26c1866
diff --git a/docker/prod/setup/postinstall-onprem.sh b/docker/prod/setup/postinstall-onprem.shindex ec4160ce7bd..bd4139fdde1 100755--- a/docker/prod/setup/postinstall-onprem.sh+++ b/docker/prod/setup/postinstall-onprem.sh@@ -30,6 +30,25 @@ apt-get install -y \service postgresql stoprm -rf /var/lib/postgresql/{$CURRENT_PGVERSION,$NEXT_PGVERSION}+# create schema_cache.yml and db/structure.sql++su - postgres -c "$PGBIN/initdb -D /tmp/nulldb"+su - postgres -c "$PGBIN/pg_ctl -D /tmp/nulldb -l /dev/null -l /tmp/nulldb/log -w start"++# give some more time for DB to start+sleep 5++echo "create database structure; create user structure with encrypted password 'p4ssw0rd'; grant all privileges on database structure to structure;" | su - postgres -c psql++# dump schema+DATABASE_URL=postgres://structure:[email protected]/structure RAILS_ENV=production bundle exec rake db:migrate db:schema:dump db:schema:cache:dump++# this line requires superuser rights, which is not always available and doesn't matter anyway+sed -i '/^COMMENT ON EXTENSION/d' db/structure.sql++su - postgres -c "$PGBIN/pg_ctl -D /tmp/nulldb stop"+rm -rf /tmp/nulldb+a2enmod proxy proxy_httprm -f /etc/apache2/sites-enabled/000-default.conf