From 2ffce874098c52c6b62e8e7e8e28c0f161dfa525 Mon Sep 17 00:00:00 2001 From: Mathieu Debove Date: Fri, 13 May 2016 17:04:51 +0200 Subject: [PATCH 1/4] Explain [OPTIONS] placeholder in docker run commands Based on discussion in https://github.com/sameersbn/docker-gitlab/issues/595, a comprehensive explanation on how to use "docker run" commands to execute Rake tasks for instance. --- README.md | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 3a4184e1c..d9e12c808 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ [![Deploy to Tutum](https://s.tutum.co/deploy-to-tutum.svg)](https://dashboard.tutum.co/stack/deploy/) # sameersbn/gitlab:8.7.5 - +-- - [Introduction](#introduction) - [Changelog](Changelog.md) - [Contributing](#contributing) @@ -1062,6 +1062,30 @@ Watch the logs and your repositories should be available into your new gitlab co See [Rake Tasks](#rake-tasks) for more information on executing rake tasks. +## Options to run commands + +This documentation often use [OPTIONS] placeholder in `docker run` commands (to create backups, import bare repositories...). + +Considering the Gitlab instance has been configured with `docker-compose` method of [Quick Start](#quick-start) and that the Gitlab, Redis and Postgresql containers are called *gitlab_gitlab_1*, *gitlab_redis_1* and *gitlab_postgresql_1* respectively, here is the configuration to replace [OPTIONS] placeholder: + +```bash +--link gitlab_redis_1:redisio --link gitlab_postgresql_1:postgresql -e "GITLAB_SECRETS_DB_KEY_BASE=long-and-random-alpha-numeric-string" -v "/srv/docker/gitlab/gitlab:/home/git/data" +``` + +> **Notice** +> +> Before executing any `docker run` command, stop the running Gitlab container. For instance, to import repositories: +> +> ```bash +> docker stop gitlab_gitlab_1 +> docker run --name gitlab -it --rm \ + --link gitlab_redis_1:redisio --link gitlab_postgresql_1:postgresql \ + -e "GITLAB_SECRETS_DB_KEY_BASE=long-and-random-alpha-numeric-string" \ + -v "/srv/docker/gitlab/gitlab:/home/git/data" \ + sameersbn/gitlab:8.7.5 app:rake gitlab:import:repos +> docker start gitlab_gitlab_1 +> ``` + ## Upgrading > **Important Notice** From 203827ea4fe1bfcc8b36287981e7f701ec4a0383 Mon Sep 17 00:00:00 2001 From: Mathieu Debove Date: Fri, 13 May 2016 17:07:18 +0200 Subject: [PATCH 2/4] Added section in TOC --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index d9e12c808..a836ae4dd 100644 --- a/README.md +++ b/README.md @@ -59,6 +59,7 @@ - [Amazon Web Services (AWS) Remote Backups](#amazon-web-services-aws-remote-backups) - [Rake Tasks](#rake-tasks) - [Import Repositories](#import-repositories) + - [Options to run commands](#options-to-run-commands) - [Upgrading](#upgrading) - [Shell Access](#shell-access) - [References](#references) From 419cbce9c84bd5d0ed82fe085389a68b31d1b600 Mon Sep 17 00:00:00 2001 From: Mathieu Debove Date: Fri, 13 May 2016 17:09:17 +0200 Subject: [PATCH 3/4] Typo in TOC --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a836ae4dd..3374b4873 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ [![Deploy to Tutum](https://s.tutum.co/deploy-to-tutum.svg)](https://dashboard.tutum.co/stack/deploy/) # sameersbn/gitlab:8.7.5 --- +- - [Introduction](#introduction) - [Changelog](Changelog.md) - [Contributing](#contributing) From a70699c2c97cf0c8f3844b3b696e287d7ddf0903 Mon Sep 17 00:00:00 2001 From: Mathieu Debove Date: Fri, 13 May 2016 17:09:51 +0200 Subject: [PATCH 4/4] Typo in TOC --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3374b4873..0d7d5f103 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ [![Deploy to Tutum](https://s.tutum.co/deploy-to-tutum.svg)](https://dashboard.tutum.co/stack/deploy/) # sameersbn/gitlab:8.7.5 -- + - [Introduction](#introduction) - [Changelog](Changelog.md) - [Contributing](#contributing)