diff --git a/Procfile b/Procfile index 28a97ddafd7dcc2317b6215e548519a23d762369..8348d681cb73c839e6d226cba531bfc7da283cc3 100644 --- a/Procfile +++ b/Procfile @@ -1,2 +1,2 @@ -web: bundle exec unicorn_rails -p $PORT -worker: bundle exec sidekiq -q post_receive,mailer,system_hook,project_web_hook,common,default +web: bundle exec unicorn_rails -p $PORT -c ./config/unicorn.rb -E $RAILS_ENV +worker: bundle exec sidekiq -q post_receive,mailer,system_hook,project_web_hook,common,default -e $RAILS_ENV \ No newline at end of file diff --git a/doc/install/installation.md b/doc/install/installation.md index 0724bea9c3be36cfe5b9f9346ef4c5bc046a6221..0a497710ea426b3b18dccf8a89ff1c5e2d218c31 100644 --- a/doc/install/installation.md +++ b/doc/install/installation.md @@ -237,6 +237,7 @@ Make sure to update username/password in config/database.yml. cd /home/gitlab/gitlab sudo gem install charlock_holmes --version '0.6.9' + sudo gem install foreman # For MySQL (note, the option says "without") sudo -u gitlab -H bundle install --deployment --without development test postgres @@ -263,18 +264,32 @@ used for the `email.from` setting in `config/gitlab.yml`) sudo -u gitlab -H bundle exec rake gitlab:setup RAILS_ENV=production -## Install Init Script +## Setup startup script -Download the init script (will be /etc/init.d/gitlab): +There are multiple ways to automate GitLab's startup. + +### Foreman export + +Export `Procfile` as upstart job using foreman: + + sudo -u gitlab -H echo 'RAILS_ENV=production' > .env + sudo bundle exec foreman export upstart /etc/init -a gitlab -u gitlab -l /home/gitlab/gitlab/log + +*Besides upstart, you can also export for bluepill, inittab and runit using foreman. See [foreman's manual](http://ddollar.github.com/foreman/#EXPORT-FORMATS) for more info.* + +### Initd + +Download the init script (will be `/etc/init.d/gitlab`): sudo curl --output /etc/init.d/gitlab https://raw.github.com/gitlabhq/gitlab-recipes/master/init.d/gitlab sudo chmod +x /etc/init.d/gitlab -Make GitLab start on boot: +*note that if you are using CentOS you should use https://raw.github.com/gitlabhq/gitlab-recipes/master/init.d/gitlab-centos instead* +Make GitLab start on boot: + sudo update-rc.d gitlab defaults 21 - ## Check Application Status Check if GitLab and its environment is configured correctly: @@ -291,9 +306,6 @@ However there are still a few steps left. ## Start Your GitLab Instance sudo service gitlab start - # or - sudo /etc/init.d/gitlab restart - # 7. Nginx