Commit f7f65577 authored by Jacob Vosmaer's avatar Jacob Vosmaer

Use $port, not $PORT to avoid foreman magic

parent a6a88b59
......@@ -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:$PORT -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)
if [ x$port = x ] ; then
# Try a port file
port=$(cat port 2>/dev/null)
fi
# Fall back to 3000
PORT=${PORT:-3000}
port=${port:-3000}
print_port() {
echo "Starting GitLab in $(pwd) on port ${port}"
echo
echo
}
foreman_start() {
exec bundle exec foreman start -p $PORT "$@"
exec env port=${port} bundle exec foreman start "$@"
}
db() {
......@@ -18,10 +24,12 @@ db() {
}
app() {
print_port
foreman_start -c all=0,rails-web=1,rails-background-jobs=1,gitlab-workhorse=1
}
all() {
print_port
foreman_start
}
......
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