mirror of
https://github.com/sameersbn/docker-gitlab.git
synced 2026-01-18 13:58:25 +00:00
gitlab: upgrade to CE v8.2.0
This commit is contained in:
parent
d98b93ffc1
commit
a321bc14cd
@ -5,6 +5,7 @@ This file only reflects the changes that are made in this image. Please refer to
|
||||
**latest**
|
||||
- gitlab-shell: upgrade to v.2.6.7
|
||||
- gitlab-workhorse: upgrade to v.0.4.2
|
||||
- gitlab: upgrade to CE v8.2.0
|
||||
|
||||
**8.1.4**
|
||||
- gitlab: upgrade to CE v8.1.4
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
FROM sameersbn/ubuntu:14.04.20151117
|
||||
MAINTAINER sameer@damagehead.com
|
||||
|
||||
ENV GITLAB_VERSION=8.1.4 \
|
||||
ENV GITLAB_VERSION=8.2.0 \
|
||||
GITLAB_SHELL_VERSION=2.6.7 \
|
||||
GITLAB_WORKHORSE_VERSION=0.4.2 \
|
||||
GITLAB_USER="git" \
|
||||
|
||||
@ -84,6 +84,7 @@ production: &base
|
||||
merge_requests: {{GITLAB_PROJECTS_MERGE_REQUESTS}}
|
||||
wiki: {{GITLAB_PROJECTS_WIKI}}
|
||||
snippets: {{GITLAB_PROJECTS_SNIPPETS}}
|
||||
builds: true
|
||||
|
||||
## Webhook settings
|
||||
# Number of seconds to wait for HTTP response after sending webhook HTTP POST request (default: 10)
|
||||
@ -123,6 +124,12 @@ production: &base
|
||||
# The mailbox where incoming mail will end up. Usually "inbox".
|
||||
mailbox: "{{IMAP_MAILBOX}}"
|
||||
|
||||
## Git LFS
|
||||
lfs:
|
||||
enabled: false
|
||||
# The location where LFS objects are stored (default: shared/lfs-objects).
|
||||
storage_path: {{GITLAB_DATA_DIR}}/shared/lfs-objects
|
||||
|
||||
## Gravatar
|
||||
## For Libravatar see: http://doc.gitlab.com/ce/customization/libravatar.html
|
||||
gravatar:
|
||||
@ -313,6 +320,9 @@ production: &base
|
||||
application_password: '{{OAUTH_CROWD_APP_PASSWORD}}' } }
|
||||
|
||||
|
||||
# Shared file storage settings
|
||||
shared:
|
||||
path: {{GITLAB_DATA_DIR}}/shared
|
||||
|
||||
|
||||
#
|
||||
@ -415,6 +425,8 @@ test:
|
||||
<<: *base
|
||||
gravatar:
|
||||
enabled: true
|
||||
lfs:
|
||||
enabled: false
|
||||
gitlab:
|
||||
host: localhost
|
||||
port: 80
|
||||
|
||||
@ -44,7 +44,7 @@ upstream gitlab-workhorse {
|
||||
|
||||
## Normal HTTP host
|
||||
server {
|
||||
## Either remove "default_server" from the listen line below,
|
||||
## Either remove "default_server" from the listen line below,
|
||||
## or delete the /etc/nginx/sites-enabled/default file. This will cause gitlab
|
||||
## to be served if you visit any address that your server responds to, eg.
|
||||
## the ip address of the server (http://x.x.x.x/)n 0.0.0.0:80 default_server;
|
||||
@ -68,7 +68,7 @@ server {
|
||||
# alias {{GITLAB_INSTALL_DIR}}/public;
|
||||
## Serve static files from defined root folder.
|
||||
## @gitlab is a named location for the upstream fallback, see below.
|
||||
try_files $uri $uri/index.html $uri.html @gitlab;
|
||||
try_files $uri /index.html $uri.html @gitlab;
|
||||
}
|
||||
|
||||
## We route uploads through GitLab to prevent XSS and enforce access control.
|
||||
@ -116,9 +116,16 @@ server {
|
||||
proxy_pass http://gitlab;
|
||||
}
|
||||
|
||||
location ~ ^{{GITLAB_RELATIVE_URL_ROOT__with_trailing_slash}}[\w\.-]+/[\w\.-]+/gitlab-lfs/objects {
|
||||
# 'Error' 418 is a hack to re-use the @gitlab-workhorse block
|
||||
error_page 418 = @gitlab-workhorse;
|
||||
return 418;
|
||||
}
|
||||
|
||||
location ~ ^{{GITLAB_RELATIVE_URL_ROOT__with_trailing_slash}}[\w\.-]+/[\w\.-]+/(info/refs|git-upload-pack|git-receive-pack)$ {
|
||||
# 'Error' 418 is a hack to re-use the @gitlab-workhorse block
|
||||
try_files /nonexisting-file @gitlab-workhorse;
|
||||
error_page 418 = @gitlab-workhorse;
|
||||
return 418;
|
||||
}
|
||||
|
||||
location ~ ^{{GITLAB_RELATIVE_URL_ROOT__with_trailing_slash}}[\w\.-]+/[\w\.-]+/repository/archive {
|
||||
@ -133,7 +140,22 @@ server {
|
||||
return 418;
|
||||
}
|
||||
|
||||
# Build artifacts should be submitted to this location
|
||||
location ~ ^{{GITLAB_RELATIVE_URL_ROOT__with_trailing_slash}}[\w\.-]+/[\w\.-]+/builds/download {
|
||||
# 'Error' 418 is a hack to re-use the @gitlab-workhorse block
|
||||
error_page 418 = @gitlab-workhorse;
|
||||
return 418;
|
||||
}
|
||||
|
||||
# Build artifacts should be submitted to this location
|
||||
location ~ {{GITLAB_RELATIVE_URL_ROOT__with_trailing_slash}}ci/api/v1/builds/[0-9]+/artifacts {
|
||||
# 'Error' 418 is a hack to re-use the @gitlab-workhorse block
|
||||
error_page 418 = @gitlab-workhorse;
|
||||
return 418;
|
||||
}
|
||||
|
||||
location @gitlab-workhorse {
|
||||
client_max_body_size 0;
|
||||
## If you use HTTPS make sure you disable gzip compression
|
||||
## to be safe against BREACH attack.
|
||||
# gzip off;
|
||||
|
||||
@ -48,7 +48,7 @@ upstream gitlab-workhorse {
|
||||
|
||||
## Redirects all HTTP traffic to the HTTPS host
|
||||
server {
|
||||
## Either remove "default_server" from the listen line below,
|
||||
## Either remove "default_server" from the listen line below,
|
||||
## or delete the /etc/nginx/sites-enabled/default file. This will cause gitlab
|
||||
## to be served if you visit any address that your server responds to, eg.
|
||||
## the ip address of the server (http://x.x.x.x/)
|
||||
@ -116,7 +116,7 @@ server {
|
||||
# alias {{GITLAB_INSTALL_DIR}}/public;
|
||||
## Serve static files from defined root folder.
|
||||
## @gitlab is a named location for the upstream fallback, see below.
|
||||
try_files $uri $uri/index.html $uri.html @gitlab;
|
||||
try_files $uri /index.html $uri.html @gitlab;
|
||||
}
|
||||
|
||||
## We route uploads through GitLab to prevent XSS and enforce access control.
|
||||
@ -166,9 +166,16 @@ server {
|
||||
proxy_pass http://gitlab;
|
||||
}
|
||||
|
||||
location ~ ^{{GITLAB_RELATIVE_URL_ROOT__with_trailing_slash}}[\w\.-]+/[\w\.-]+/gitlab-lfs/objects {
|
||||
# 'Error' 418 is a hack to re-use the @gitlab-workhorse block
|
||||
error_page 418 = @gitlab-workhorse;
|
||||
return 418;
|
||||
}
|
||||
|
||||
location ~ ^{{GITLAB_RELATIVE_URL_ROOT__with_trailing_slash}}[\w\.-]+/[\w\.-]+/(info/refs|git-upload-pack|git-receive-pack)$ {
|
||||
# 'Error' 418 is a hack to re-use the @gitlab-workhorse block
|
||||
try_files /nonexisting-file @gitlab-workhorse;
|
||||
error_page 418 = @gitlab-workhorse;
|
||||
return 418;
|
||||
}
|
||||
|
||||
location ~ ^{{GITLAB_RELATIVE_URL_ROOT__with_trailing_slash}}[\w\.-]+/[\w\.-]+/repository/archive {
|
||||
@ -183,7 +190,22 @@ server {
|
||||
return 418;
|
||||
}
|
||||
|
||||
# Build artifacts should be submitted to this location
|
||||
location ~ ^{{GITLAB_RELATIVE_URL_ROOT__with_trailing_slash}}[\w\.-]+/[\w\.-]+/builds/download {
|
||||
# 'Error' 418 is a hack to re-use the @gitlab-workhorse block
|
||||
error_page 418 = @gitlab-workhorse;
|
||||
return 418;
|
||||
}
|
||||
|
||||
# Build artifacts should be submitted to this location
|
||||
location ~ {{GITLAB_RELATIVE_URL_ROOT__with_trailing_slash}}ci/api/v1/builds/[0-9]+/artifacts {
|
||||
# 'Error' 418 is a hack to re-use the @gitlab-workhorse block
|
||||
error_page 418 = @gitlab-workhorse;
|
||||
return 418;
|
||||
}
|
||||
|
||||
location @gitlab-workhorse {
|
||||
client_max_body_size 0;
|
||||
## If you use HTTPS make sure you disable gzip compression
|
||||
## to be safe against BREACH attack.
|
||||
gzip off;
|
||||
|
||||
@ -744,6 +744,20 @@ initialize_datadir() {
|
||||
rm -rf ${GITLAB_INSTALL_DIR}/builds
|
||||
ln -sf ${GITLAB_BUILDS_DIR} ${GITLAB_INSTALL_DIR}/builds
|
||||
|
||||
# create shared directory
|
||||
mkdir -p ${GITLAB_DATA_DIR}/shared/artifacts/tmp/{cache,uploads}
|
||||
chmod u+rwX ${GITLAB_DATA_DIR}/shared
|
||||
chown ${GITLAB_USER}:${GITLAB_USER} ${GITLAB_DATA_DIR}/shared
|
||||
|
||||
# symlink ${GITLAB_INSTALL_DIR}/shared -> ${GITLAB_DATA_DIR}/shared
|
||||
rm -rf ${GITLAB_INSTALL_DIR}/shared
|
||||
ln -sf ${GITLAB_DATA_DIR}/shared ${GITLAB_INSTALL_DIR}/shared
|
||||
|
||||
# create lfs-objects directory
|
||||
mkdir -p ${GITLAB_DATA_DIR}/shared/lfs-objects
|
||||
chmod u+rwX ${GITLAB_DATA_DIR}/shared/lfs-objects
|
||||
chown ${GITLAB_USER}:${GITLAB_USER} ${GITLAB_DATA_DIR}/shared/lfs-objects
|
||||
|
||||
# create the backups directory
|
||||
mkdir -p ${GITLAB_BACKUP_DIR}
|
||||
chown ${GITLAB_USER}:${GITLAB_USER} ${GITLAB_BACKUP_DIR}
|
||||
@ -784,6 +798,14 @@ sanitize_datadir() {
|
||||
chmod -R u+rwX ${GITLAB_BUILDS_DIR}
|
||||
chown -R ${GITLAB_USER}:${GITLAB_USER} ${GITLAB_BUILDS_DIR}
|
||||
|
||||
mkdir -p ${GITLAB_DATA_DIR}/shared/artifacts/tmp/{cache,uploads}
|
||||
chmod -R u+rwX ${GITLAB_DATA_DIR}/shared
|
||||
chown -R ${GITLAB_USER}:${GITLAB_USER} ${GITLAB_DATA_DIR}/shared
|
||||
|
||||
mkdir -p ${GITLAB_DATA_DIR}/shared/lfs-objects
|
||||
chmod -R u+rwX ${GITLAB_DATA_DIR}/shared/lfs-objects
|
||||
chown -R ${GITLAB_USER}:${GITLAB_USER} ${GITLAB_DATA_DIR}/shared/lfs-objects
|
||||
|
||||
find ${GITLAB_DATA_DIR}/uploads -type f -exec chmod 0644 {} \;
|
||||
find ${GITLAB_DATA_DIR}/uploads -type d -not -path ${GITLAB_DATA_DIR}/uploads -exec chmod 0755 {} \;
|
||||
chmod 0750 ${GITLAB_DATA_DIR}/uploads/
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user