From 99772c9ea2a5d653a95ecb07b540586b4370165a Mon Sep 17 00:00:00 2001 From: Cyril Rohr Date: Wed, 26 Mar 2014 14:56:25 +0000 Subject: [PATCH] Fix .pkgr.yml so that discourse can be packaged with https://pkgr.io. --- .pkgr.yml | 1 + packaging/debian/setup.sh | 19 ++++++++++++++----- 2 files changed, 15 insertions(+), 5 deletions(-) create mode 100644 .pkgr.yml diff --git a/.pkgr.yml b/.pkgr.yml new file mode 100644 index 00000000000..39a5f66dde4 --- /dev/null +++ b/.pkgr.yml @@ -0,0 +1 @@ +before_precompile: ./packaging/debian/setup.sh diff --git a/packaging/debian/setup.sh b/packaging/debian/setup.sh index 72afe2d6c08..1d7424f5e94 100755 --- a/packaging/debian/setup.sh +++ b/packaging/debian/setup.sh @@ -1,8 +1,17 @@ #!/bin/sh -# This script installs the required example config files before buildpack compilation. +# This script sets up the required config files before buildpack compilation. +# +# It also launches a postgresql server and a redis server, otherwise some rake +# tasks can't be completed. -set -ex +set -e -cp config/database.yml.production-sample config/database.yml -cp config/redis.yml.sample config/redis.yml -cp config/environments/production.rb.sample config/environments/production.rb +# Not everyone chooses to run discourse behind Apache or Nginx. +cat >> config/environments/production.rb <