Merge branch 'docker-post-reconfigure' into 'master'

Support running a supplied post reconfigure script in the docker container

If the env variable GITLAB_POST_RECONFIGURE_SCRIPT is set, we will eval it in /assets/wrapper

This will be useful for the OpenShift template, as it's not easy to use their post hook for most of our use cases because they boot up another instance of the gitlab container to run your custom command (and you can't do much in a new gitlab container without running reconfigure first)

Specifically I am going to use it to run something like this:
`/opt/gitlab/bin/gitlab-rails runner -e production 'Doorkeeper::Application.where(uid: "generated_uid", secret: "generated_secret", redirect_uri: "http://example.com", name: "Mattermost").first_or_create;'`

So that I can setup a separate Mattermost pod at the same time as bringing up gitlab.

See merge request !1017
This commit is contained in:
Marin Jankovski 2016-10-05 11:49:34 +00:00
commit aa8bec589a
2 changed files with 6 additions and 0 deletions

View File

@ -6,6 +6,7 @@ omnibus-gitlab repository.
8.13.0
- Add support for registry debug addr configuration
- Support specifying a post reconfigure script to run in the docker container
- Updated cacerts.pem to 2016-09-14 version
8.12.3

View File

@ -79,6 +79,11 @@ echo "Configuring GitLab package..."
echo "Configuring GitLab..."
gitlab-ctl reconfigure
if [ -n "${GITLAB_POST_RECONFIGURE_SCRIPT+x}" ]; then
echo "Runnning Post Reconfigure Script..."
eval ${GITLAB_POST_RECONFIGURE_SCRIPT}
fi
# Tail all logs
gitlab-ctl tail &