Skip to content

Commit

Permalink
Fix .pkgr.yml so that discourse can be packaged with https://pkgr.io.
Browse files Browse the repository at this point in the history
  • Loading branch information
crohr committed Mar 26, 2014
1 parent 3631ba2 commit 99772c9
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
1 change: 1 addition & 0 deletions .pkgr.yml
@@ -0,0 +1 @@
before_precompile: ./packaging/debian/setup.sh
19 changes: 14 additions & 5 deletions 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 <<EOF
Discourse::Application.configure do
config.serve_static_assets = true
end
EOF

sudo service postgresql start
sudo service redis-server start

0 comments on commit 99772c9

Please sign in to comment.