From 70dea3d9807fdb0fc24c445a5e5298dbabf18200 Mon Sep 17 00:00:00 2001 From: ununseptium Date: Mon, 28 Nov 2016 22:13:30 +0100 Subject: [PATCH] update gitlab to latest version (#343) * update gitlab to latest version This should refer to the offical docker compose file of gitlab: https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/docker/docker-compose.yml * added option to select gitlab external_url prefix This is needed so that rancher will put a correct uri scheme prefix to the ${gitlab_hostname} to the external_url. * added external_url prefix honestly i don't know if `${gitlab_omnipus_prefix}${gitlab_hostname}` will work since i cannot test it by myself right now, but imo that should work.... * changed version to latest since image is going to be gitlab/gitlab-ce:latest, the version here inside the readme should reflect this. * update to latest --- templates/gitlab/0/README.md | 2 +- templates/gitlab/0/docker-compose.yml | 7 +++++-- templates/gitlab/0/rancher-compose.yml | 14 ++++++++++++-- templates/gitlab/config.yml | 2 +- 4 files changed, 19 insertions(+), 6 deletions(-) diff --git a/templates/gitlab/0/README.md b/templates/gitlab/0/README.md index d6b6b7f..ca11a7c 100644 --- a/templates/gitlab/0/README.md +++ b/templates/gitlab/0/README.md @@ -2,7 +2,7 @@ GitLab CE is a free alternative to GitHub -Stack based on official GitLab version: 8.5.1-ce.0 +Stack based on official GitLab version: latest https://hub.docker.com/r/gitlab/gitlab-ce/ diff --git a/templates/gitlab/0/docker-compose.yml b/templates/gitlab/0/docker-compose.yml index d7d7205..25e7e81 100644 --- a/templates/gitlab/0/docker-compose.yml +++ b/templates/gitlab/0/docker-compose.yml @@ -6,9 +6,12 @@ gitlab-server: labels: io.rancher.sidekicks: gitlab-data hostname: ${gitlab_hostname} - image: gitlab/gitlab-ce:8.5.1-ce.0 + image: gitlab/gitlab-ce:latest volumes_from: - gitlab-data + environment: + GITLAB_OMNIBUS_CONFIG: | + external_url '${gitlab_omnipus_prefix}${gitlab_hostname}' gitlab-data: labels: @@ -16,7 +19,7 @@ gitlab-data: entrypoint: - /bin/true hostname: gitdata - image: gitlab/gitlab-ce:8.5.1-ce.0 + image: gitlab/gitlab-ce:latest volumes: - /etc/gitlab - /var/log/gitlab diff --git a/templates/gitlab/0/rancher-compose.yml b/templates/gitlab/0/rancher-compose.yml index bdf31bc..9147ff9 100644 --- a/templates/gitlab/0/rancher-compose.yml +++ b/templates/gitlab/0/rancher-compose.yml @@ -1,6 +1,6 @@ .catalog: name: Gitlab Community - version: 8.5.1-0 + version: latest description: | Gitlab CE is a free GitHub alternative minimum_rancher_version: v0.56.0 @@ -8,11 +8,21 @@ uuid: gitlab-0 questions: - variable: "gitlab_hostname" - description: "Gitlab hostname" + description: "Gitlab hostname (without uri scheme http:// or https://)" label: "Hostname:" required: true default: "git.example.com" type: "string" + - variable: "gitlab_omnipus_prefix" + label: "Gitlab external_url prefix:" + description: | + This is needed for the docker-compose file to set the correct external_url + default: 'https://' + required: true + type: "string" + options: + - 'https://' + - 'http://' - variable: "http_port" description: "HTTP port to expose on host. Will be used to bind TCP" label: "HTTP port:" diff --git a/templates/gitlab/config.yml b/templates/gitlab/config.yml index 0ad5c00..66e2221 100644 --- a/templates/gitlab/config.yml +++ b/templates/gitlab/config.yml @@ -1,5 +1,5 @@ name: Gitlab Community description: | Gitlab CE is a free GitHub alternative -version: 8.5.1-0 +version: latest category: Versioning