Fix .pkgr.yml so that discourse can be packaged with https://pkgr.io.

This commit is contained in:
Cyril Rohr 2014-03-26 14:56:25 +00:00
parent 3631ba2eb5
commit 99772c9ea2
2 changed files with 15 additions and 5 deletions

1
.pkgr.yml Normal file
View File

@ -0,0 +1 @@
before_precompile: ./packaging/debian/setup.sh

View File

@ -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 <<EOF
Discourse::Application.configure do
config.serve_static_assets = true
end
EOF
sudo service postgresql start
sudo service redis-server start