forked from discourse/discourse
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix .pkgr.yml so that discourse can be packaged with https://pkgr.io.
- Loading branch information
Showing
2 changed files
with
15 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
before_precompile: ./packaging/debian/setup.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |