Commit 4571902e authored by Jacob Vosmaer's avatar Jacob Vosmaer

Add a 'run' wrapper script for foreman

parent bf24045d
......@@ -25,3 +25,4 @@ gitlab-openldap/share/
.vagrant/
gitlab-workhorse/
.vagrant_enabled
PORT
......@@ -2,6 +2,6 @@ redis: redis-server /home/git/redis/redis.conf
postgresql: postgres -D /home/git/postgresql/data -k /home/git/postgresql -h ''
#postgresql-replica: postgres -D /home/git/postgresql-replica/data -k /home/git/postgresql-replica -h ''
#openldap: cd gitlab-openldap && libexec/slapd -F slapd.d -d2 -h "ldap://127.0.0.1:3890"
gitlab-workhorse: PATH=/home/git/gitlab-workhorse:$PATH gitlab-workhorse -authSocket /home/git/gitlab.socket -listenAddr localhost:3000 -documentRoot /home/git/gitlab/public -developmentMode
gitlab-workhorse: PATH=/home/git/gitlab-workhorse:$PATH gitlab-workhorse -authSocket /home/git/gitlab.socket -listenAddr localhost:$PORT -documentRoot /home/git/gitlab/public -developmentMode
rails-web: cd gitlab && BUNDLE_GEMFILE=Gemfile RAILS_ENV=development bin/web start_foreground
rails-background-jobs: cd gitlab && BUNDLE_GEMFILE=Gemfile RAILS_ENV=development bin/background_jobs start_foreground
#!/bin/sh
# Try to read the gitlab-workhorse port from the environment
if [ x$PORT = x ] ; then
# Try a PORT file
PORT=$(cat PORT 2>/dev/null)
fi
# Fall back to 3000
PORT=${PORT:-3000}
foreman_start() {
exec bundle exec foreman start -p $PORT "$@"
}
db() {
foreman_start -c all=0,redis=1,postgresql=1,gitlab-openldap=1
}
app() {
foreman_start -c all=0,rails-web=1,rails-background-jobs=1,gitlab-workhorse=1
}
all() {
foreman_start
}
case x$1 in
xdb)
db
;;
xapp)
app
;;
x*)
all
;;
esac
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment