Commit 6f5f5e7e authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Add suppoort of unicorn and fog gems

parent cefd8fe2
...@@ -59,8 +59,9 @@ gem "haml-rails" ...@@ -59,8 +59,9 @@ gem "haml-rails"
# Files attachments # Files attachments
gem "carrierwave" gem "carrierwave"
# for aws storage # for aws storage
# gem "fog", "~> 1.3.1" gem "fog", "~> 1.3.1", group: :aws
# Authorization # Authorization
gem "six" gem "six"
...@@ -76,7 +77,8 @@ gem "github-markup", "~> 0.7.4", require: 'github/markup' ...@@ -76,7 +77,8 @@ gem "github-markup", "~> 0.7.4", require: 'github/markup'
gem "asciidoctor" gem "asciidoctor"
# Servers # Servers
gem "puma", '~> 2.0.1' gem "puma", '~> 2.3.1', group: :puma
gem "unicorn", '~> 4.6.3', group: :unicorn
# State machine # State machine
gem "state_machine" gem "state_machine"
......
...@@ -116,6 +116,7 @@ GEM ...@@ -116,6 +116,7 @@ GEM
erubis (2.7.0) erubis (2.7.0)
escape_utils (0.2.4) escape_utils (0.2.4)
eventmachine (1.0.3) eventmachine (1.0.3)
excon (0.13.4)
execjs (1.4.0) execjs (1.4.0)
multi_json (~> 1.0) multi_json (~> 1.0)
factory_girl (4.2.0) factory_girl (4.2.0)
...@@ -131,6 +132,16 @@ GEM ...@@ -131,6 +132,16 @@ GEM
eventmachine (>= 0.12.0) eventmachine (>= 0.12.0)
ffaker (1.16.0) ffaker (1.16.0)
ffi (1.8.1) ffi (1.8.1)
fog (1.3.1)
builder
excon (~> 0.13.0)
formatador (~> 0.2.0)
mime-types
multi_json (~> 1.0)
net-scp (~> 1.0.4)
net-ssh (>= 2.1.3)
nokogiri (~> 1.5.0)
ruby-hmac
font-awesome-rails (3.1.1.3) font-awesome-rails (3.1.1.3)
railties (>= 3.2, < 5.0) railties (>= 3.2, < 5.0)
foreman (0.63.0) foreman (0.63.0)
...@@ -243,6 +254,7 @@ GEM ...@@ -243,6 +254,7 @@ GEM
kaminari (0.14.1) kaminari (0.14.1)
actionpack (>= 3.0.0) actionpack (>= 3.0.0)
activesupport (>= 3.0.0) activesupport (>= 3.0.0)
kgio (2.8.0)
launchy (2.2.0) launchy (2.2.0)
addressable (~> 2.3) addressable (~> 2.3)
letter_opener (1.1.0) letter_opener (1.1.0)
...@@ -267,6 +279,9 @@ GEM ...@@ -267,6 +279,9 @@ GEM
multipart-post (1.2.0) multipart-post (1.2.0)
mysql2 (0.3.11) mysql2 (0.3.11)
net-ldap (0.3.1) net-ldap (0.3.1)
net-scp (1.0.4)
net-ssh (>= 1.99.1)
net-ssh (2.6.8)
nokogiri (1.5.9) nokogiri (1.5.9)
oauth (0.4.7) oauth (0.4.7)
oauth2 (0.8.1) oauth2 (0.8.1)
...@@ -305,7 +320,7 @@ GEM ...@@ -305,7 +320,7 @@ GEM
coderay (~> 1.0.5) coderay (~> 1.0.5)
method_source (~> 0.8) method_source (~> 0.8)
slop (~> 3.4) slop (~> 3.4)
puma (2.0.1) puma (2.3.1)
rack (>= 1.1, < 2.0) rack (>= 1.1, < 2.0)
pygments.rb (0.4.2) pygments.rb (0.4.2)
posix-spawn (~> 0.3.6) posix-spawn (~> 0.3.6)
...@@ -354,6 +369,7 @@ GEM ...@@ -354,6 +369,7 @@ GEM
rake (>= 0.8.7) rake (>= 0.8.7)
rdoc (~> 3.4) rdoc (~> 3.4)
thor (>= 0.14.6, < 2.0) thor (>= 0.14.6, < 2.0)
raindrops (0.11.0)
rake (10.0.4) rake (10.0.4)
rb-fsevent (0.9.3) rb-fsevent (0.9.3)
rb-inotify (0.9.0) rb-inotify (0.9.0)
...@@ -400,6 +416,7 @@ GEM ...@@ -400,6 +416,7 @@ GEM
rspec-core (~> 2.13.0) rspec-core (~> 2.13.0)
rspec-expectations (~> 2.13.0) rspec-expectations (~> 2.13.0)
rspec-mocks (~> 2.13.0) rspec-mocks (~> 2.13.0)
ruby-hmac (0.4.0)
ruby-progressbar (1.0.2) ruby-progressbar (1.0.2)
rubyntlm (0.1.1) rubyntlm (0.1.1)
rubyzip (0.9.9) rubyzip (0.9.9)
...@@ -499,6 +516,10 @@ GEM ...@@ -499,6 +516,10 @@ GEM
execjs (>= 0.3.0) execjs (>= 0.3.0)
multi_json (~> 1.0, >= 1.0.2) multi_json (~> 1.0, >= 1.0.2)
underscore-rails (1.4.4) underscore-rails (1.4.4)
unicorn (4.6.3)
kgio (~> 2.6)
rack
raindrops (~> 0.7)
virtus (0.5.4) virtus (0.5.4)
backports (~> 2.6.1) backports (~> 2.6.1)
descendants_tracker (~> 0.0.1) descendants_tracker (~> 0.0.1)
...@@ -536,6 +557,7 @@ DEPENDENCIES ...@@ -536,6 +557,7 @@ DEPENDENCIES
enumerize enumerize
factory_girl_rails factory_girl_rails
ffaker ffaker
fog (~> 1.3.1)
font-awesome-rails (~> 3.1.1) font-awesome-rails (~> 3.1.1)
foreman foreman
gemoji (~> 1.2.1) gemoji (~> 1.2.1)
...@@ -574,7 +596,7 @@ DEPENDENCIES ...@@ -574,7 +596,7 @@ DEPENDENCIES
pg pg
poltergeist (~> 1.3.0) poltergeist (~> 1.3.0)
pry pry
puma (~> 2.0.1) puma (~> 2.3.1)
quiet_assets (~> 1.0.1) quiet_assets (~> 1.0.1)
rack-mini-profiler rack-mini-profiler
rails (= 3.2.13) rails (= 3.2.13)
...@@ -608,4 +630,5 @@ DEPENDENCIES ...@@ -608,4 +630,5 @@ DEPENDENCIES
turbolinks turbolinks
uglifier uglifier
underscore-rails (~> 1.4.4) underscore-rails (~> 1.4.4)
unicorn (~> 4.6.3)
webmock webmock
# Sample verbose configuration file for Unicorn (not Rack)
#
# This configuration file documents many features of Unicorn
# that may not be needed for some applications. See
# http://unicorn.bogomips.org/examples/unicorn.conf.minimal.rb
# for a much simpler configuration file.
#
# See http://unicorn.bogomips.org/Unicorn/Configurator.html for complete
# documentation.
# Use at least one worker per core if you're on a dedicated server,
# more will usually help for _short_ waits on databases/caches.
worker_processes 2
# Since Unicorn is never exposed to outside clients, it does not need to
# run on the standard HTTP port (80), there is no reason to start Unicorn
# as root unless it's from system init scripts.
# If running the master process as root and the workers as an unprivileged
# user, do this to switch euid/egid in the workers (also chowns logs):
# user "unprivileged_user", "unprivileged_group"
# Help ensure your application will always spawn in the symlinked
# "current" directory that Capistrano sets up.
working_directory "/home/git/gitlab/current" # available in 0.94.0+
# listen on both a Unix domain socket and a TCP port,
# we use a shorter backlog for quicker failover when busy
listen "/home/git/gitlab/tmp/sockets/gitlab.socket", :backlog => 64
listen 8080, :tcp_nopush => true
# nuke workers after 30 seconds instead of 60 seconds (the default)
timeout 30
# feel free to point this anywhere accessible on the filesystem
pid "/home/git/gitlab/tmp/pids/unicorn.pid"
# By default, the Unicorn logger will write to stderr.
# Additionally, ome applications/frameworks log to stderr or stdout,
# so prevent them from going to /dev/null when daemonized here:
stderr_path "/home/git/gitlab/log/unicorn.stderr.log"
stdout_path "/home/git/gitlab/log/unicorn.stdout.log"
# 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
GC.respond_to?(:copy_on_write_friendly=) and
GC.copy_on_write_friendly = 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
before_fork do |server, worker|
# the following is highly recomended for Rails + "preload_app true"
# as there's no need for the master process to hold a connection
defined?(ActiveRecord::Base) and
ActiveRecord::Base.connection.disconnect!
# 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|
# 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)
# the following is *required* for Rails + "preload_app true",
defined?(ActiveRecord::Base) and
ActiveRecord::Base.establish_connection
# if preload_app is true, then you may also want to check and
# restart any other shared sockets/descriptors such as Memcached,
# and Redis. TokyoCabinet file handles are safe to reuse
# between any number of forked children (assuming your kernel
# correctly implements pread()/pwrite() system calls)
end
...@@ -226,10 +226,10 @@ Make sure to edit both `gitlab.yml` and `puma.rb` to match your setup. ...@@ -226,10 +226,10 @@ Make sure to edit both `gitlab.yml` and `puma.rb` to match your setup.
sudo gem install charlock_holmes --version '0.6.9.4' sudo gem install charlock_holmes --version '0.6.9.4'
# For MySQL (note, the option says "without ... postgres") # For MySQL (note, the option says "without ... postgres")
sudo -u git -H bundle install --deployment --without development test postgres sudo -u git -H bundle install --deployment --without development test postgres unicorn aws
# Or for PostgreSQL (note, the option says "without ... mysql") # Or for PostgreSQL (note, the option says "without ... mysql")
sudo -u git -H bundle install --deployment --without development test mysql sudo -u git -H bundle install --deployment --without development test mysql unicorn aws
## Initialize Database and Activate Advanced Features ## Initialize Database and Activate Advanced Features
......
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