diff options
Diffstat (limited to 'www/gitlab-ce/files')
7 files changed, 60 insertions, 39 deletions
diff --git a/www/gitlab-ce/files/gitlab.in b/www/gitlab-ce/files/gitlab.in index c2460623ad4c..18e22fc7fe5a 100644 --- a/www/gitlab-ce/files/gitlab.in +++ b/www/gitlab-ce/files/gitlab.in @@ -47,9 +47,20 @@ restart_cmd="restart_gitlab" load_rc_config $name ### Environment variables -RAILS_ENV="production" -USE_UNICORN="1" -SIDEKIQ_WORKERS=1 +RAILS_ENV=${RAILS_ENV:-'production'} +SIDEKIQ_WORKERS=${SIDEKIQ_WORKERS:-1} +USE_WEB_SERVER=${USE_WEB_SERVER:-'unicorn'} + +case "${USE_WEB_SERVER}" in + puma|unicorn) + use_web_server="$USE_WEB_SERVER" + ;; + *) + echo "Unsupported web server '${USE_WEB_SERVER}' (Allowed: 'puma', 'unicorn')" 1>&2 + exit 1 + ;; +esac + # Script variable names should be lower-case not to conflict with # internal /bin/sh variables such as PATH, EDITOR or SHELL. @@ -58,7 +69,7 @@ app_root="%%PREFIX%%/www/gitlab-ce" pid_path="$app_root/tmp/pids" socket_path="$app_root/tmp/sockets" rails_socket="$socket_path/gitlab.socket" -web_server_pid_path="$pid_path/unicorn.pid" +web_server_pid_path="$pid_path/$use_web_server.pid" if checkyesno gitlab_mail_room_enable; then mail_room_enabled=true else @@ -151,13 +162,6 @@ if ! cd "$app_root" ; then echo "Failed to cd into $app_root, exiting!"; exit 1 fi -# Select the web server to use -if [ -z "$USE_UNICORN" ]; then - use_web_server="puma" -else - use_web_server="unicorn" -fi - if [ -z "$SIDEKIQ_WORKERS" ]; then sidekiq_pid_path="$pid_path/sidekiq.pid" else diff --git a/www/gitlab-ce/files/patch-Gemfile b/www/gitlab-ce/files/patch-Gemfile index 08f241dfb3b8..43e4ccb870ae 100644 --- a/www/gitlab-ce/files/patch-Gemfile +++ b/www/gitlab-ce/files/patch-Gemfile @@ -1,13 +1,5 @@ ---- Gemfile.orig 2020-05-04 10:07:41 UTC +--- Gemfile.orig 2020-05-21 17:04:27 UTC +++ Gemfile -@@ -1,6 +1,6 @@ - source 'https://rubygems.org' - --gem 'rails', '6.0.2' -+gem 'rails', '6.0.3.1' - - gem 'bootsnap', '~> 1.4.6' - @@ -18,7 +18,7 @@ gem 'default_value_for', '~> 3.3.0' # Supported DBs gem 'pg', '~> 1.1' @@ -33,8 +25,8 @@ +gem 'hipchat', '~> 1.6.0' # Jira integration - gem 'jira-ruby', '~> 1.7' -@@ -329,91 +328,6 @@ group :metrics do + gem 'jira-ruby', '~> 2.0.0' +@@ -325,94 +324,6 @@ group :metrics do # Prometheus gem 'prometheus-client-mmap', '~> 0.10.0' gem 'raindrops', '~> 0.18' @@ -64,7 +56,7 @@ - - gem 'database_cleaner', '~> 1.7.0' - gem 'factory_bot_rails', '~> 5.1.0' -- gem 'rspec-rails', '~> 4.0.0.beta4' +- gem 'rspec-rails', '~> 4.0.0' - - # Prevent occasions where minitest is not bundled in packaged versions of ruby (see #3826) - gem 'minitest', '~> 5.11.0' @@ -123,6 +115,9 @@ - gem 'test-prof', '~> 0.10.0' - gem 'rspec_junit_formatter' - gem 'guard-rspec' +- +- # Moved in `test` because https://gitlab.com/gitlab-org/gitlab/-/issues/217527 +- gem 'derailed_benchmarks', require: false end gem 'octokit', '~> 4.15' diff --git a/www/gitlab-ce/files/patch-config_gitlab.yml.example b/www/gitlab-ce/files/patch-config_gitlab.yml.example index 32a9d738b793..a9730c2768fd 100644 --- a/www/gitlab-ce/files/patch-config_gitlab.yml.example +++ b/www/gitlab-ce/files/patch-config_gitlab.yml.example @@ -1,6 +1,6 @@ ---- config/gitlab.yml.example.orig 2020-05-15 17:18:13 UTC +--- config/gitlab.yml.example.orig 2020-05-21 17:04:27 UTC +++ config/gitlab.yml.example -@@ -955,7 +955,7 @@ production: &base +@@ -961,7 +961,7 @@ production: &base # Gitaly settings gitaly: # Path to the directory containing Gitaly client executables. @@ -9,7 +9,7 @@ # Default Gitaly authentication token. Can be overridden per storage. Can # be left blank when Gitaly is running locally on a Unix socket, which # is the normal way to deploy Gitaly. -@@ -973,8 +973,8 @@ production: &base +@@ -979,8 +979,8 @@ production: &base # real path not the symlink. storages: # You must have at least a `default` storage path. default: @@ -20,7 +20,7 @@ # gitaly_token: 'special token' # Optional: override global gitaly.token for this storage. ## Backup settings -@@ -1020,12 +1020,12 @@ production: &base +@@ -1026,12 +1026,12 @@ production: &base ## GitLab Shell settings gitlab_shell: @@ -36,7 +36,7 @@ # Git over HTTP upload_pack: true -@@ -1044,13 +1044,13 @@ production: &base +@@ -1050,13 +1050,13 @@ production: &base ## GitLab Elasticsearch settings elasticsearch: diff --git a/www/gitlab-ce/files/patch-config_initializers_active__record__fix__insert__all.rb b/www/gitlab-ce/files/patch-config_initializers_active__record__fix__insert__all.rb deleted file mode 100644 index 361f0a78e815..000000000000 --- a/www/gitlab-ce/files/patch-config_initializers_active__record__fix__insert__all.rb +++ /dev/null @@ -1,11 +0,0 @@ ---- config/initializers/active_record_fix_insert_all.rb.orig 2020-05-15 17:18:13 UTC -+++ config/initializers/active_record_fix_insert_all.rb -@@ -7,7 +7,7 @@ - # This is covered by tests in `BulkInsertSafe` - # that validates handling of different data types - --if Rails.gem_version > Gem::Version.new("6.0.2") -+if Rails.gem_version > Gem::Version.new("6.0.3.1") - raise Gem::DependencyError, - "Remove patch once the https://github.com/rails/rails/pull/38763 is included" - end diff --git a/www/gitlab-ce/files/patch-config_redis.cache.yml.example b/www/gitlab-ce/files/patch-config_redis.cache.yml.example new file mode 100644 index 000000000000..6b4ab859e73a --- /dev/null +++ b/www/gitlab-ce/files/patch-config_redis.cache.yml.example @@ -0,0 +1,11 @@ +--- config/redis.cache.yml.example.orig 2020-05-23 10:51:33 UTC ++++ config/redis.cache.yml.example +@@ -18,7 +18,7 @@ test: + # url: redis://localhost:6380 + production: + # Redis (single instance) +- url: unix:/var/run/redis/redis.cache.sock ++ url: unix:/var/run/redis/redis.sock + ## + # Redis + Sentinel (for HA) + # diff --git a/www/gitlab-ce/files/patch-config_redis.queues.yml.example b/www/gitlab-ce/files/patch-config_redis.queues.yml.example new file mode 100644 index 000000000000..1d760f26bde3 --- /dev/null +++ b/www/gitlab-ce/files/patch-config_redis.queues.yml.example @@ -0,0 +1,11 @@ +--- config/redis.queues.yml.example.orig 2020-05-23 10:52:06 UTC ++++ config/redis.queues.yml.example +@@ -18,7 +18,7 @@ test: + # url: redis://localhost:6381 + production: + # Redis (single instance) +- url: unix:/var/run/redis/redis.queues.sock ++ url: unix:/var/run/redis/redis.sock + ## + # Redis + Sentinel (for HA) + # diff --git a/www/gitlab-ce/files/patch-config_redis.shared__state.yml.example b/www/gitlab-ce/files/patch-config_redis.shared__state.yml.example new file mode 100644 index 000000000000..1e7e1b9e5a11 --- /dev/null +++ b/www/gitlab-ce/files/patch-config_redis.shared__state.yml.example @@ -0,0 +1,11 @@ +--- config/redis.shared_state.yml.example.orig 2020-05-23 10:48:31 UTC ++++ config/redis.shared_state.yml.example +@@ -18,7 +18,7 @@ test: + # url: redis://localhost:6382 + production: + # Redis (single instance) +- url: unix:/var/run/redis/redis.shared_state.sock ++ url: unix:/var/run/redis/redis.sock + ## + # Redis + Sentinel (for HA) + # |