Commit aefdac00a2eb02279a7701b963f5b4d770c3a1a6
Exists in
spb-stable
and in
2 other branches
Merge pull request #6716 from pkgr/pkgr
Automatically generate debian package with pkgr.io
Showing
2 changed files
with
42 additions
and
0 deletions
Show diff stats
| @@ -0,0 +1,19 @@ | @@ -0,0 +1,19 @@ | ||
| 1 | +user: git | ||
| 2 | +group: git | ||
| 3 | +before_precompile: ./bin/pkgr_before_precompile.sh | ||
| 4 | +targets: | ||
| 5 | + debian-7: &wheezy | ||
| 6 | + build_dependencies: | ||
| 7 | + - libicu-dev | ||
| 8 | + dependencies: | ||
| 9 | + - libicu48 | ||
| 10 | + - libpcre3 | ||
| 11 | + - git | ||
| 12 | + ubuntu-12.04: *wheezy | ||
| 13 | + ubuntu-14.04: | ||
| 14 | + build_dependencies: | ||
| 15 | + - libicu-dev | ||
| 16 | + dependencies: | ||
| 17 | + - libicu52 | ||
| 18 | + - libpcre3 | ||
| 19 | + - git |
| @@ -0,0 +1,23 @@ | @@ -0,0 +1,23 @@ | ||
| 1 | +#!/bin/sh | ||
| 2 | + | ||
| 3 | +set -e | ||
| 4 | + | ||
| 5 | +for file in config/*.yml.example; do | ||
| 6 | + cp ${file} config/$(basename ${file} .example) | ||
| 7 | +done | ||
| 8 | + | ||
| 9 | +# Allow to override the Gitlab URL from an environment variable, as this will avoid having to change the configuration file for simple deployments. | ||
| 10 | +config=$(echo '<% gitlab_url = URI(ENV["GITLAB_URL"] || "http://localhost:80") %>' | cat - config/gitlab.yml) | ||
| 11 | +echo "$config" > config/gitlab.yml | ||
| 12 | +sed -i "s/host: localhost/host: <%= gitlab_url.host %>/" config/gitlab.yml | ||
| 13 | +sed -i "s/port: 80/port: <%= gitlab_url.port %>/" config/gitlab.yml | ||
| 14 | +sed -i "s/https: false/https: <%= gitlab_url.scheme == 'https' %>/" config/gitlab.yml | ||
| 15 | + | ||
| 16 | +# No need for config file. Will be taken care of by REDIS_URL env variable | ||
| 17 | +rm config/resque.yml | ||
| 18 | + | ||
| 19 | +# Set default unicorn.rb file | ||
| 20 | +echo "" > config/unicorn.rb | ||
| 21 | + | ||
| 22 | +# Required for assets precompilation | ||
| 23 | +sudo service postgresql start |