mirror of
https://github.com/sameersbn/docker-gitlab.git
synced 2026-01-18 13:58:25 +00:00
init: added gitlab oauth configuration support
This commit is contained in:
parent
8d17f600df
commit
d31c1f959c
@ -10,6 +10,7 @@
|
||||
- gitlab: upgrade to CE v.7.8.0
|
||||
- init: set `LDAP_PORT` default value to `389`
|
||||
- init: set `LDAP_METHOD` default value to `plain`
|
||||
- init: added gitlab oauth configuration support
|
||||
|
||||
**7.7.2**
|
||||
- gitlab-shell: upgrade to v.2.4.2
|
||||
|
||||
@ -785,6 +785,8 @@ Below is the complete list of available options that can be used to customize yo
|
||||
- **OAUTH_TWITTER_APP_SECRET**: Twitter App API secret. No defaults.
|
||||
- **OAUTH_GITHUB_API_KEY**: GitHub App Client ID. No defaults.
|
||||
- **OAUTH_GITHUB_APP_SECRET**: GitHub App Client secret. No defaults.
|
||||
- **OAUTH_GITLAB_API_KEY**: GitLab App Client ID. No defaults.
|
||||
- **OAUTH_GITLAB_APP_SECRET**: GitLab App Client secret. No defaults.
|
||||
- **REDMINE_URL**: Location of the redmine server, e.g. `-e 'REDMINE_URL=https://redmine.example.com'`. No defaults.
|
||||
- **JIRA_URL**: Location of the jira server, e.g. `-e 'JIRA_URL=https://jira.example.com'`. No defaults.
|
||||
- **USERMAP_UID**: Sets the uid for user `git` to the specified uid. Defaults to `1000`.
|
||||
|
||||
@ -221,6 +221,9 @@ production: &base
|
||||
- { name: 'github', app_id: '{{OAUTH_GITHUB_API_KEY}}',
|
||||
app_secret: '{{OAUTH_GITHUB_APP_SECRET}}',
|
||||
args: { scope: '{{OAUTH_GITHUB_SCOPE}}' } }
|
||||
- { name: 'gitlab', app_id: '{{OAUTH_GITLAB_API_KEY}}',
|
||||
app_secret: '{{OAUTH_GITLAB_APP_SECRET}}',
|
||||
args: { scope: '{{OAUTH_GITLAB_SCOPE}}' } }
|
||||
|
||||
|
||||
|
||||
|
||||
15
assets/init
15
assets/init
@ -112,6 +112,9 @@ OAUTH_TWITTER_APP_SECRET=${OAUTH_TWITTER_APP_SECRET:-}
|
||||
OAUTH_GITHUB_API_KEY=${OAUTH_GITHUB_API_KEY:-}
|
||||
OAUTH_GITHUB_APP_SECRET=${OAUTH_GITHUB_APP_SECRET:-}
|
||||
|
||||
OAUTH_GITLAB_API_KEY=${OAUTH_GITLAB_API_KEY:-}
|
||||
OAUTH_GITLAB_APP_SECRET=${OAUTH_GITLAB_APP_SECRET:-}
|
||||
|
||||
GOOGLE_ANALYTICS_ID=${GOOGLE_ANALYTICS_ID:-}
|
||||
|
||||
PIWIK_URL=${PIWIK_URL:-}
|
||||
@ -573,6 +576,18 @@ else
|
||||
sudo -u git -H sed '/{{OAUTH_GITHUB_SCOPE}}/d' -i config/gitlab.yml
|
||||
fi
|
||||
|
||||
# gitlab
|
||||
if [ -n "${OAUTH_GITLAB_API_KEY}" -a -n "${OAUTH_GITLAB_APP_SECRET}" ]; then
|
||||
OAUTH_ENABLED=true
|
||||
sudo -u git -H sed 's/{{OAUTH_GITLAB_API_KEY}}/'"${OAUTH_GITLAB_API_KEY}"'/' -i config/gitlab.yml
|
||||
sudo -u git -H sed 's/{{OAUTH_GITLAB_APP_SECRET}}/'"${OAUTH_GITLAB_APP_SECRET}"'/' -i config/gitlab.yml
|
||||
sudo -u git -H sed 's/{{OAUTH_GITLAB_SCOPE}}/api/' -i config/gitlab.yml
|
||||
else
|
||||
sudo -u git -H sed '/{{OAUTH_GITLAB_API_KEY}}/d' -i config/gitlab.yml
|
||||
sudo -u git -H sed '/{{OAUTH_GITLAB_APP_SECRET}}/d' -i config/gitlab.yml
|
||||
sudo -u git -H sed '/{{OAUTH_GITLAB_SCOPE}}/d' -i config/gitlab.yml
|
||||
fi
|
||||
|
||||
# google analytics
|
||||
if [ -n "${GOOGLE_ANALYTICS_ID}" ]; then
|
||||
sudo -u git -H sed 's/{{GOOGLE_ANALYTICS_ID}}/'"${GOOGLE_ANALYTICS_ID}"'/' -i config/gitlab.yml
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user