Commit 8fac2f49 authored by Kevin Daudt's avatar Kevin Daudt 💻
Browse files

gitlab: rebase default nginx config patch

parent c5fb4d54
......@@ -3,3 +3,4 @@
.env.*
.task/
*/build/lib/libsetup
overlay/usr/local/lib/libsetup
......@@ -82,12 +82,24 @@ tasks:
generates: [ .env ]
### GITLAB ###
deploy-libs-gitlab:
cmds:
- |-
install -Dm0644 lib/* -t overlay/usr/local/lib/
echo "Deployed libs for gitlab"
silent: true
sources:
- lib/libsetup
generates:
- "overlay/usr/local/lib/libsetup"
run: when_changed
build-gitlab:
cmds:
- docker-compose build gitlab
deps:
- .build-args
- build-gitlab-shell
- deploy-libs-gitlab
sources:
- build-args.env
- overlay/*
......
......@@ -9,8 +9,8 @@ set -eu -o pipefail
build_gitlab_shell() {
apk add make patch rdfind
apply_patch /tmp/makefile-fix-version.patch
apply_patch -p0 /tmp/gitlab-shell-changes.patch
apply_patch -i /tmp/makefile-fix-version.patch
apply_patch -p0 -i /tmp/gitlab-shell-changes.patch
make build
make install DESTDIR=/home/git/gitlab-shell PREFIX=/
......
......@@ -20,13 +20,18 @@ _strip_binaries() {
apply_patch() {
patch_file=
options=
for arg; do
while true; do
arg=$1
case $arg in
-*) options="$options $arg";;
*) patch_file=$arg; patch_name=$(basename "$arg");;
-i) patch_file=$2; shift;;
-i*) patch_file=${arg#-i*};;
*) options="$options $arg";;
esac
shift
[ $# -eq 0 ] && break
done
echo "Applying $patch_name"
echo "Applying $(basename "$patch_file")"
# shellcheck disable=SC2086
patch $options -i $patch_file
}
diff --git a/lib/support/nginx/gitlab b/lib/support/nginx/gitlab
index 74eb8634d..8b440237e 100644
--- ./lib/support/nginx/gitlab
+++ ./lib/support/nginx/gitlab
@@ -19,7 +19,8 @@
@@ -19,7 +19,7 @@
upstream gitlab-workhorse {
# GitLab socket file,
# for Omnibus this would be: unix:/var/opt/gitlab/gitlab-workhorse/sockets/socket
- server unix:/home/git/gitlab/tmp/sockets/gitlab-workhorse.socket fail_timeout=0;
+ # server unix:/home/git/gitlab/tmp/sockets/gitlab-workhorse.socket fail_timeout=0;
+ server localhost:8181 fail_timeout=0;
}
map $http_upgrade $connection_upgrade_gitlab {
@@ -68,21 +69,26 @@ server {
@@ -68,21 +68,23 @@ server {
## the ip address of the server (http://x.x.x.x/)n 0.0.0.0:80 default_server;
listen 0.0.0.0:80 default_server;
listen [::]:80 default_server;
- server_name YOUR_SERVER_FQDN; ## Replace this with something like gitlab.example.com
+ # server_name YOUR_SERVER_FQDN; ## Replacdde this with something like gitlab.example.com
server_tokens off; ## Don't show the nginx version number, a security best practice
+ access_log /dev/stdout;
+ error_log /dev/stdout;
## See app/controllers/application_controller.rb for headers set
......@@ -37,8 +35,8 @@
## Individual nginx logs for this GitLab vhost
- access_log /var/log/nginx/gitlab_access.log gitlab_access;
- error_log /var/log/nginx/gitlab_error.log;
+ # access_log /var/log/nginx/gitlab_access.log gitlab_access;
+ # error_log /var/log/nginx/gitlab_error.log;
+ access_log /dev/stdout gitlab_access;
+ error_log /dev/stdout;
location / {
client_max_body_size 0;
......@@ -2,6 +2,8 @@
set -eu
. /usr/local/lib/libsetup
gitlab_location=/home/git/gitlab
: ${PROTOBUF_VERSION:=}
......@@ -98,12 +100,12 @@ rm -rf "$gitlab_location"/log
ln -sf /var/log/gitlab "$gitlab_location"/log
# https://gitlab.com/gitlab-org/gitlab-foss/issues/47483
cd "$gitlab_location"
patch -p0 -i /tmp/gitlab/disable-check-gitaly.patch
patch -p0 -i /tmp/gitlab/puma-no-redirect.patch
patch -p0 -i /tmp/gitlab/puma-socket-path.patch
patch -p0 -i /tmp/logrotate/logrotate-defaults.patch
patch -p0 -i /tmp/nginx/nginx-config.patch
patch -p0 -i /tmp/resque/resque-config.patch
apply_patch -p0 -i /tmp/gitlab/disable-check-gitaly.patch
apply_patch -p0 -i /tmp/gitlab/puma-no-redirect.patch
apply_patch -p0 -i /tmp/gitlab/puma-socket-path.patch
apply_patch -p0 -i /tmp/logrotate/logrotate-defaults.patch
apply_patch -p0 -i /tmp/nginx/nginx-config.patch
apply_patch -p0 -i /tmp/resque/resque-config.patch
# temporary symlink the example configs to make setup happy
for config in gitlab.yml.example database.yml.postgresql; do
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment