summaryrefslogtreecommitdiff
path: root/contrib/docker/entrypoint-python-gitlab.sh
diff options
context:
space:
mode:
authorHans Donner <hans@hansdonner.nl>2018-09-29 15:54:25 +0200
committerHans Donner <hans@hansdonner.nl>2018-09-29 15:54:25 +0200
commit21d257782bb1aea9d154e797986ed0f6cdd36fad (patch)
treed21b13e9b5174e553912c63d3139b9d985b5e6b4 /contrib/docker/entrypoint-python-gitlab.sh
parent77f4d3af9c1e5f08b8f4e3aa32c7944c9814dab0 (diff)
downloadgitlab-21d257782bb1aea9d154e797986ed0f6cdd36fad.tar.gz
more flexible docker
Diffstat (limited to 'contrib/docker/entrypoint-python-gitlab.sh')
-rwxr-xr-xcontrib/docker/entrypoint-python-gitlab.sh21
1 files changed, 21 insertions, 0 deletions
diff --git a/contrib/docker/entrypoint-python-gitlab.sh b/contrib/docker/entrypoint-python-gitlab.sh
new file mode 100755
index 0000000..6422ad0
--- /dev/null
+++ b/contrib/docker/entrypoint-python-gitlab.sh
@@ -0,0 +1,21 @@
+#!/bin/sh
+
+GITLAB_CFG=${GITLAB_CFG:-"/etc/python-gitlab-default.cfg"}
+
+cat << EOF > /etc/python-gitlab-default.cfg
+[global]
+default = gitlab
+ssl_verify = ${GITLAB_SSL_VERIFY:-true}
+timeout = ${GITLAB_TIMEOUT:-5}
+api_version = ${GITLAB_API_VERSION:-4}
+per_page = ${GITLAB_PER_PAGE:-10}
+
+[gitlab]
+url = ${GITLAB_URL:-https://gitlab.com}
+private_token = ${GITLAB_PRIVATE_TOKEN}
+oauth_token = ${GITLAB_OAUTH_TOKEN}
+http_username = ${GITLAB_HTTP_USERNAME}
+http_password = ${GITLAB_HTTP_PASSWORD}
+EOF
+
+exec gitlab --config-file "${GITLAB_CFG}" $@