This repository was archived by the owner on Apr 3, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 14
dokku
amtrack edited this page Sep 20, 2014
·
1 revision
- dokku-user-env-compile
- dokku-supervisord
- dokku-md-plugin
- dokku-redis-plugin
- dokku-docker-options
- dokku-rebuild
$ git clone https://github.com/gitlabhq/gitlabhq.git
$ cd gitlabhq$ git checkout -b deployment
$ echo -e "https://github.com/amtrack/buildpack-gitlab.git\nhttps://github.com/heroku/heroku-buildpack-ruby.git" > .buildpacks
$ git add .buildpacks
$ git commit -m "prepare for dokku"$ git remote add dokku <your-dokku-url>
$ git push dokku deployment:master # will failroot@vps:$ dokku config:set gitlab BUILDPACK_URL=https://github.com/ddollar/heroku-buildpack-multi.git
root@vps:$ dokku config:set gitlab CURL_TIMEOUT=120
root@vps:$ dokku mariadb:create gitlab
root@vps:$ dokku redis:create gitlab$ git push dokku deployment:masterroot@vps:$ dokku run gitlab bundle exec rake db:setup RAILS_ENV=production
root@vps:$ dokku run gitlab bundle exec rake db:seed_fu RAILS_ENV=productionroot@vps:$ dokku run gitlab bundle exec rake gitlab:check RAILS_ENV=productionOpen https://gitlab.YOURDOMAIN in your browser.
It is highly recommended to run these steps as early as possible after having deployed gitlab.
Create some folders for persistent storage:
root@vps:$ test -d /opt/gitlab/repositories || sudo mkdir -p /opt/gitlab/repositories; sudo chown -R dokku:dokku /opt/gitlab/repositories
root@vps:$ test -d /opt/gitlab/gitlab-satellites || sudo mkdir -p /opt/gitlab/gitlab-satellites; sudo chown -R dokku:dokku /opt/gitlab/gitlab-satellites
root@vps:$ test -d /opt/gitlab/log || sudo mkdir -p /opt/gitlab/log; sudo chown -R dokku:dokku /opt/gitlab/log
root@vps:$ test -d /opt/gitlab/.ssh || sudo mkdir -p /opt/gitlab/.ssh; sudo chown -R dokku:dokku /opt/gitlab/.sshSet some docker options for persistent storage:
root@vps:$ dokku docker-options:add gitlab "-v /opt/gitlab/repositories:/home/git/repositories"
root@vps:$ dokku docker-options:add gitlab "-v /opt/gitlab/gitlab-satellites:/home/git/gitlab-satellites"
root@vps:$ dokku docker-options:add gitlab "-v /opt/gitlab/log:/app/log"
root@vps:$ dokku docker-options:add gitlab "-v /opt/gitlab/.ssh:/home/git/.ssh"Rebuild the app to apply the docker options:
root@vps:$ dokku rebuild gitlabYou will need to make some changes in the config/gitlab.yml file (see instruction at GitLab Installation Guide)
and expose the containers port 22 to the host port 2222 (for example).
First tell dokku to expose the port when the app is build again
root@vps:$ dokku docker-options:add gitlab "-p 2222:22"Then create the config based on the example config file
$ cp config/gitlab.yml.example config/gitlab.yml
$ git add -f config/gitlab.yml
$ git commit -am "force add config/gitlab.yml"Make the following changes
* gitlab.host: gitlab.YOURDOMAIN
* gitlab_shell.ssh_port: 2222
Commit and push the changes
$ git commit -am "expose repositories on port 2222 via SSH"
$ git push dokku deployment:master