Commit ced75a6b authored by Dmytro Makovey's avatar Dmytro Makovey Committed by Jason Plum
Browse files

remove references to Unicorn for 14.0 release

parent 90f6080b
......@@ -9,7 +9,7 @@ Each directory contains the `Dockerfile` for a specific component of the
infrastructure needed to run GitLab.
* [rails](/gitlab-rails) - The Rails code needed for both API and web.
* [webservice](/gitlab-webservice) - The webservice container that exposes Rails webservers (Unicorn or Puma).
* [webservice](/gitlab-webservice) - The webservice container that exposes Rails webservers (Puma).
* [workhorse](/gitlab-workhorse) - The GitLab Workhorse container providing smart-proxy in front of Rails.
* [sidekiq](/gitlab-sidekiq) - The Sidekiq container that runs async Rails jobs.
* [shell](/gitlab-shell) - Running GitLab Shell and OpenSSH to provide git over ssh, and authorized keys support from the database
......
......@@ -13,8 +13,8 @@ LABEL source="https://gitlab.com/gitlab-org/build/CNG/-/tree/master/gitlab-webse
vendor="GitLab" \
version=${GITLAB_VERSION} \
release=${GITLAB_VERSION} \
summary="GitLab Web Service runs the GitLab Rails application with Unicorn or Puma web server." \
description="GitLab Web Service runs the GitLab Rails application with Unicorn or Puma web server."
summary="GitLab Web Service runs the GitLab Rails application with Puma web server." \
description="GitLab Web Service runs the GitLab Rails application with Puma web server."
ADD gitlab-webservice-ee.tar.gz /
ADD gitlab-python.tar.gz /
......
# Relative URL support
# WARNING: We recommend using an FQDN to host GitLab in a root path instead
# of using a relative URL.
# Documentation: http://doc.gitlab.com/ce/install/relative_url.html
# Uncomment and customize the following line to run in a non-root path
#
# ENV['RAILS_RELATIVE_URL_ROOT'] = "/gitlab"
worker_processes (ENV['WORKER_PROCESSES'] ||= '3').to_i
working_directory "/srv/gitlab"
listen "0.0.0.0:#{ENV['INTERNAL_PORT'] ||= '8080'}", :tcp_nopush => true
# nuke workers after 30 seconds instead of 60 seconds (the default)
#
# NOTICE: git push over http depends on this value.
# If you want to be able to push huge amount of data to git repository over http
# you will have to increase this value too.
#
# Example of output if you try to push 1GB repo to GitLab over http.
# -> git push http://gitlab.... master
#
# error: RPC failed; result=18, HTTP code = 200
# fatal: The remote end hung up unexpectedly
# fatal: The remote end hung up unexpectedly
#
# For more information see http://stackoverflow.com/a/21682112/752049
#
timeout (ENV['WORKER_TIMEOUT'] ||= '60').to_i
# feel free to point this anywhere accessible on the filesystem
pid "#{ENV['HOME']}/unicorn.pid"
# combine Ruby 2.0.0dev or REE with "preload_app true" for memory savings
# http://rubyenterpriseedition.com/faq.html#adapt_apps_for_cow
preload_app true
# Enable this flag to have unicorn test client connections by writing the
# beginning of the HTTP headers before calling the application. This
# prevents calling the application for connections that have disconnected
# while queued. This is only guaranteed to detect clients on the same
# host unicorn runs on, and unlikely to detect disconnects even on a
# fast LAN.
check_client_connection false
require_relative "/srv/gitlab/lib/gitlab/cluster/lifecycle_events"
require_relative "/srv/gitlab/lib/gitlab/log_timestamp_formatter.rb"
before_exec do |server|
# Signal application hooks that we're about to restart
Gitlab::Cluster::LifecycleEvents.do_before_master_restart
end
run_once = true
before_fork do |server, worker|
if run_once
# There is a difference between Puma and Unicorn:
# - Puma calls before_fork once when booting up master process
# - Unicorn runs before_fork whenever new work is spawned
# To unify this behavior we call before_fork only once (we use
# this callback for deleting Prometheus files so for our purposes
# it makes sense to align behavior with Puma)
run_once = false
# Signal application hooks that we're about to fork
Gitlab::Cluster::LifecycleEvents.do_before_fork
end
# The following is only recommended for memory/DB-constrained
# installations. It is not needed if your system can house
# twice as many worker_processes as you have configured.
#
# This allows a new master process to incrementally
# phase out the old master process with SIGTTOU to avoid a
# thundering herd (especially in the "preload_app false" case)
# when doing a transparent upgrade. The last worker spawned
# will then kill off the old master process with a SIGQUIT.
old_pid = "#{server.config[:pid]}.oldbin"
if old_pid != server.pid
begin
sig = (worker.nr + 1) >= server.worker_processes ? :QUIT : :TTOU
Process.kill(sig, File.read(old_pid).to_i)
rescue Errno::ENOENT, Errno::ESRCH
end
end
#
# Throttle the master from forking too quickly by sleeping. Due
# to the implementation of standard Unix signal handlers, this
# helps (but does not completely) prevent identical, repeated signals
# from being lost when the receiving process is busy.
# sleep 1
end
after_fork do |server, worker|
# Signal application hooks of worker start
Gitlab::Cluster::LifecycleEvents.do_worker_start
# per-process listener ports for debugging/admin/migrations
# addr = "127.0.0.1:#{9293 + worker.nr}"
# server.listen(addr, :tries => -1, :delay => 5, :tcp_nopush => true)
end
# Configure the default logger to use a custom formatter that formats the
# timestamps to be in UTC and in ISO8601.3 format
Configurator::DEFAULTS[:logger].formatter = Gitlab::LogTimestampFormatter.new
ENV['GITLAB_UNICORN_MEMORY_MIN'] = ((ENV['UNICORN_MEMORY_MIN'] ||= '1024').to_i * 1 << 20).to_s
ENV['GITLAB_UNICORN_MEMORY_MAX'] = ((ENV['UNICORN_MEMORY_MAX'] ||= '1280').to_i * 1 << 20).to_s
......@@ -27,7 +27,6 @@ if [ "${GITLAB_WEBSERVER^^}" = "PUMA" ]; then
/srv/gitlab/bin/bundle exec puma --environment production \
--config /srv/gitlab/config/puma.rb /srv/gitlab/config.ru
else
echo "Starting Unicorn"
/srv/gitlab/bin/bundle exec unicorn -E production \
-c /srv/gitlab/config/unicorn.rb /srv/gitlab/config.ru
echo "ERROR: Unknown Webserver requested '${GITLAB_WEBSERVER}'. Exiting"
exit 1
fi
Markdown is supported
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