diff --git a/Capfile b/Capfile new file mode 100644 index 000000000..60628f5df --- /dev/null +++ b/Capfile @@ -0,0 +1,45 @@ +# Load DSL and set up stages +require "capistrano/setup" + +# Include default deployment tasks +require "capistrano/deploy" + +# Load the SCM plugin appropriate to your project: +# +# require "capistrano/scm/hg" +# install_plugin Capistrano::SCM::Hg +# or +# require "capistrano/scm/svn" +# install_plugin Capistrano::SCM::Svn +# or +require "capistrano/scm/git" +install_plugin Capistrano::SCM::Git + +# Load the RVM plugin +require 'rvm1/capistrano3' +# Load NPM plugin +require 'capistrano/npm' +# Load thin server plugin +require 'capistrano/thin' + +# Include tasks from other gems included in your Gemfile +# +# For documentation on these, see for example: +# +# https://github.com/capistrano/rvm +# https://github.com/capistrano/rbenv +# https://github.com/capistrano/chruby +# https://github.com/capistrano/bundler +# https://github.com/capistrano/rails +# https://github.com/capistrano/passenger +# +# require "capistrano/rvm" +# require "capistrano/rbenv" +# require "capistrano/chruby" +# require "capistrano/bundler" +# require "capistrano/rails/assets" +# require "capistrano/rails/migrations" +# require "capistrano/passenger" +# require 'capistrano/ssh_doctor' +# Load custom tasks from `lib/capistrano/tasks` if you have any defined +Dir.glob("lib/capistrano/tasks/*.rake").each { |r| import r } diff --git a/Gemfile b/Gemfile index 6c9dd88e2..8fb63da06 100644 --- a/Gemfile +++ b/Gemfile @@ -1,6 +1,9 @@ source 'https://rubygems.org' ruby '2.4.5' +gem 'bundler', '=2.3.26' +gem 'dotenv', '~> 2.6', '>= 2.6.0' +gem 'dotenv-rails' # Dependency Management gem 'bower-rails', '~> 0.11.0' @@ -15,14 +18,14 @@ gem 'cortex-exceptions', '= 0.0.4' gem 'cortex-plugins-core', '= 0.12.4' # API -gem 'grape', '~> 0.19.2' -gem 'grape-entity', '~> 0.6.1' -gem 'grape-swagger', '~> 0.27.3' -gem 'grape-swagger-entity', '~> 0.2.1' +gem 'grape', github: 'saurabh-sharma-cb/grape-cortex', branch: 'v1.5.3-grape-cortex' +gem 'grape-entity' +gem 'grape-swagger' +gem 'grape-swagger-entity' # Authorization gem 'six', '~> 0.2.0' -gem 'devise', '~> 4.2.1' +gem 'devise', '~> 4.8.1' gem 'rack-oauth2', '~> 1.6.1' gem 'doorkeeper', '~> 4.2' gem 'rolify', '~> 5.1' @@ -55,6 +58,7 @@ gem 'rack-cors', '~> 0.4.1', require: 'rack/cors' gem 'excon', '~> 0.55.0' gem 'hashie', '~> 3.5.5' gem 'hashr', '~> 2.0.1' +gem 'mimemagic', '~> 0.3.9' gem 'mime-types', '~> 3.1.0' gem 'interactor-rails', '~> 2.0' gem 'virtus', '~> 1.0.5' @@ -108,6 +112,8 @@ gem 'dialog-polyfill-rails', '~> 0.4.5' gem 'flipper', '< 0.11' gem 'flipper-ui', '< 0.11' gem 'flipper-active_record', '< 0.11' +gem 'foreman' +gem 'thin' group :tasks do # Parsing @@ -116,8 +122,7 @@ end group :test, :development do # Environment - gem 'dotenv-rails', :require => 'dotenv/rails-now' - gem 'foreman' + # gem 'dotenv-rails', :require => 'dotenv/rails-now' # Cache/Sidekiq gem 'redis-namespace' @@ -183,3 +188,15 @@ group :staging, :production do # Performance gem 'bootscale', require: false end + +group :development do + gem 'capistrano', '~> 3.10', require: false + gem 'capistrano-rails', '~> 1.3', require: false + gem 'ed25519', '~> 1.3' + gem 'bcrypt_pbkdf', '~> 1.1' + gem 'rvm1-capistrano3', require: false + gem 'capistrano-npm' + gem 'capistrano-thin', '~> 2.0.0' + # Environment variable autoload from .env + # gem 'dotenv', '~> 2.6', '>= 2.6.0' +end diff --git a/Gemfile.lock b/Gemfile.lock index 5903b228c..f6d7a45d1 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -5,6 +5,19 @@ GIT awesome_nested_set (3.1.2) activerecord (>= 4.0.0, < 5.1) +GIT + remote: https://github.com/saurabh-sharma-cb/grape-cortex.git + revision: 0af2eceeddb7c985ea688584c8328e88b71491ef + branch: v1.5.3-grape-cortex + specs: + grape (1.5.3) + activesupport + builder + dry-types (>= 1.1) + mustermann-grape (~> 1.0.0) + rack (>= 1.3.0) + rack-accept + GIT remote: https://github.com/triloch/rails-observers.git revision: ea30390cb07b4a37dd2f9d03966c89c1372f9dbe @@ -15,39 +28,39 @@ GIT GEM remote: https://rubygems.org/ specs: - actioncable (5.0.7.1) - actionpack (= 5.0.7.1) + actioncable (5.0.7.2) + actionpack (= 5.0.7.2) nio4r (>= 1.2, < 3.0) websocket-driver (~> 0.6.1) - actionmailer (5.0.7.1) - actionpack (= 5.0.7.1) - actionview (= 5.0.7.1) - activejob (= 5.0.7.1) + actionmailer (5.0.7.2) + actionpack (= 5.0.7.2) + actionview (= 5.0.7.2) + activejob (= 5.0.7.2) mail (~> 2.5, >= 2.5.4) rails-dom-testing (~> 2.0) - actionpack (5.0.7.1) - actionview (= 5.0.7.1) - activesupport (= 5.0.7.1) + actionpack (5.0.7.2) + actionview (= 5.0.7.2) + activesupport (= 5.0.7.2) rack (~> 2.0) rack-test (~> 0.6.3) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.0.2) - actionview (5.0.7.1) - activesupport (= 5.0.7.1) + actionview (5.0.7.2) + activesupport (= 5.0.7.2) builder (~> 3.1) erubis (~> 2.7.0) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.0.3) - activejob (5.0.7.1) - activesupport (= 5.0.7.1) + activejob (5.0.7.2) + activesupport (= 5.0.7.2) globalid (>= 0.3.6) - activemodel (5.0.7.1) - activesupport (= 5.0.7.1) - activerecord (5.0.7.1) - activemodel (= 5.0.7.1) - activesupport (= 5.0.7.1) + activemodel (5.0.7.2) + activesupport (= 5.0.7.2) + activerecord (5.0.7.2) + activemodel (= 5.0.7.2) + activesupport (= 5.0.7.2) arel (~> 7.0) - activesupport (5.0.7.1) + activesupport (5.0.7.2) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 0.7, < 2) minitest (~> 5.1) @@ -56,6 +69,8 @@ GEM activerecord (>= 4.0) addressable (2.5.2) public_suffix (>= 2.0.2, < 4.0) + airbrussh (1.4.1) + sshkit (>= 1.6.1, != 1.7.0) angular-rails-templates (1.0.2) railties (>= 4.2, < 6) sprockets (>= 3.0, < 5) @@ -66,22 +81,25 @@ GEM no_proxy_fix (~> 0.1.2, >= 0.1.2) arel (7.1.4) attr_required (1.0.1) - autoprefixer-rails (9.4.6) - execjs - aws-sdk (2.11.212) - aws-sdk-resources (= 2.11.212) - aws-sdk-core (2.11.212) + autoprefixer-rails (10.4.13.0) + execjs (~> 2) + aws-eventstream (1.2.0) + aws-sdk (2.11.632) + aws-sdk-resources (= 2.11.632) + aws-sdk-core (2.11.632) aws-sigv4 (~> 1.0) jmespath (~> 1.0) - aws-sdk-resources (2.11.212) - aws-sdk-core (= 2.11.212) - aws-sigv4 (1.0.3) + aws-sdk-resources (2.11.632) + aws-sdk-core (= 2.11.632) + aws-sigv4 (1.5.2) + aws-eventstream (~> 1, >= 1.0.2) axiom-types (0.1.1) descendants_tracker (~> 0.0.4) ice_nine (~> 0.11.0) thread_safe (~> 0.3, >= 0.3.1) - bcrypt (3.1.12) - better_errors (2.5.0) + bcrypt (3.1.18) + bcrypt_pbkdf (1.1.0) + better_errors (2.9.1) coderay (>= 1.0.0) erubi (>= 1.0.0) rack (>= 0.9.0) @@ -95,15 +113,30 @@ GEM thor (~> 0.19) bower-rails (0.11.0) breadcrumbs_on_rails (3.0.1) - builder (3.2.3) - byebug (10.0.2) - capybara (3.13.2) + builder (3.2.4) + byebug (11.1.3) + capistrano (3.17.2) + airbrussh (>= 1.0.0) + i18n + rake (>= 10.0.0) + sshkit (>= 1.9.0) + capistrano-bundler (2.1.0) + capistrano (~> 3.1) + capistrano-npm (1.0.3) + capistrano (>= 3.0.0) + capistrano-rails (1.6.2) + capistrano (~> 3.1) + capistrano-bundler (>= 1.1, < 3) + capistrano-thin (2.0.1) + capistrano (~> 3.0) + thin (~> 1.6) + capybara (3.32.2) addressable mini_mime (>= 0.1.3) nokogiri (~> 1.8) rack (>= 1.6.0) rack-test (>= 0.6.3) - regexp_parser (~> 1.2) + regexp_parser (~> 1.5) xpath (~> 3.2) cells (4.1.7) declarative-builder (< 0.2.0) @@ -125,11 +158,11 @@ GEM climate_control (>= 0.0.3, < 1.0) codeclimate-test-reporter (0.6.0) simplecov (>= 0.7.1, < 1.0.0) - coderay (1.1.2) + coderay (1.1.3) coercible (1.0.0) descendants_tracker (~> 0.0.1) - concurrent-ruby (1.1.4) - connection_pool (2.2.2) + concurrent-ruby (1.2.2) + connection_pool (2.2.5) content_disposition (1.0.0) cortex-exceptions (0.0.4) cortex-plugins-core (0.12.4) @@ -144,9 +177,10 @@ GEM rails (>= 4) react_on_rails (~> 6) shrine (~> 2.6) - crass (1.0.4) - database_cleaner (1.7.0) - debug_inspector (0.0.3) + crass (1.0.6) + daemons (1.4.1) + database_cleaner (1.99.0) + debug_inspector (1.1.0) declarative-builder (0.1.0) declarative-option (< 0.2.0) declarative-option (0.1.0) @@ -154,29 +188,52 @@ GEM activerecord (>= 3.1.0, < 5.2.0) descendants_tracker (0.0.4) thread_safe (~> 0.3, >= 0.3.1) - devise (4.2.1) + devise (4.8.1) bcrypt (~> 3.0) orm_adapter (~> 0.1) - railties (>= 4.1.0, < 5.1) + railties (>= 4.1.0) responders warden (~> 1.2.3) dialog-polyfill-rails (0.4.5.1) - diff-lcs (1.3) - docile (1.3.1) + diff-lcs (1.5.0) + docile (1.3.5) doorkeeper (4.4.3) railties (>= 4.2) - dotenv (2.6.0) - dotenv-rails (2.6.0) - dotenv (= 2.6.0) - railties (>= 3.2, < 6.0) - down (4.8.0) + dotenv (2.8.1) + dotenv-rails (2.8.1) + dotenv (= 2.8.1) + railties (>= 3.2) + down (5.2.2) addressable (~> 2.5) + dry-configurable (0.11.6) + concurrent-ruby (~> 1.0) + dry-core (~> 0.4, >= 0.4.7) + dry-equalizer (~> 0.2) + dry-container (0.7.2) + concurrent-ruby (~> 1.0) + dry-configurable (~> 0.1, >= 0.1.3) + dry-core (0.4.9) + concurrent-ruby (~> 1.0) + dry-equalizer (0.3.0) + dry-inflector (0.2.0) + dry-logic (1.0.8) + concurrent-ruby (~> 1.0) + dry-core (~> 0.2) + dry-equalizer (~> 0.2) + dry-types (1.4.0) + concurrent-ruby (~> 1.0) + dry-container (~> 0.3) + dry-core (~> 0.4, >= 0.4.4) + dry-equalizer (~> 0.3) + dry-inflector (~> 0.1, >= 0.1.2) + dry-logic (~> 1.0, >= 1.0.2) + ed25519 (1.3.0) elasticsearch (5.0.5) elasticsearch-api (= 5.0.5) elasticsearch-transport (= 5.0.5) elasticsearch-api (5.0.5) multi_json - elasticsearch-extensions (0.0.30) + elasticsearch-extensions (0.0.33) ansi elasticsearch elasticsearch-model (5.1.0) @@ -187,27 +244,49 @@ GEM elasticsearch-transport (5.0.5) faraday multi_json - email_spec (2.2.0) + email_spec (2.2.1) htmlentities (~> 4.3.3) launchy (~> 2.1) mail (~> 2.7) equalizer (0.0.11) - erubi (1.8.0) + erubi (1.12.0) erubis (2.7.0) + eventmachine (1.2.7) excon (0.55.0) - execjs (2.7.0) - exifr (1.3.5) + execjs (2.8.1) + exifr (1.3.10) factory_girl (4.9.0) activesupport (>= 3.0.0) factory_girl_rails (4.9.0) factory_girl (~> 4.9.0) railties (>= 3.0.0) - faker (1.9.1) + faker (1.9.6) i18n (>= 0.7) - faraday (0.15.4) - multipart-post (>= 1.2, < 3) - fastimage (2.1.5) - ffi (1.10.0) + faraday (1.10.3) + faraday-em_http (~> 1.0) + faraday-em_synchrony (~> 1.0) + faraday-excon (~> 1.1) + faraday-httpclient (~> 1.0) + faraday-multipart (~> 1.0) + faraday-net_http (~> 1.0) + faraday-net_http_persistent (~> 1.0) + faraday-patron (~> 1.0) + faraday-rack (~> 1.0) + faraday-retry (~> 1.0) + ruby2_keywords (>= 0.0.4) + faraday-em_http (1.0.0) + faraday-em_synchrony (1.0.0) + faraday-excon (1.1.0) + faraday-httpclient (1.0.1) + faraday-multipart (1.0.4) + multipart-post (~> 2) + faraday-net_http (1.0.1) + faraday-net_http_persistent (1.2.0) + faraday-patron (1.0.0) + faraday-rack (1.0.0) + faraday-retry (1.0.3) + fastimage (2.2.6) + ffi (1.15.5) flipper (0.10.2) flipper-active_record (0.10.2) activerecord (>= 3.2, < 6) @@ -225,10 +304,9 @@ GEM fog-core (~> 1.27) font-awesome-sass (4.7.0) sass (>= 3.2) - foreman (0.85.0) - thor (~> 0.19.1) - formatador (0.2.5) - fspath (3.1.0) + foreman (0.87.2) + formatador (0.3.0) + fspath (3.1.2) globalid (0.4.2) activesupport (>= 4.2.0) gon (6.1.0) @@ -236,34 +314,24 @@ GEM json multi_json request_store (>= 1.0) - grape (0.19.2) - activesupport - builder - hashie (>= 2.1.0) - multi_json (>= 1.3.2) - multi_xml (>= 0.5.2) - mustermann-grape (~> 1.0.0) - rack (>= 1.3.0) - rack-accept - virtus (>= 1.0.0) - grape-entity (0.6.1) - activesupport (>= 5.0.0) + grape-entity (0.8.2) + activesupport (>= 3.0.0) multi_json (>= 1.3.2) grape-kaminari (0.1.9) grape kaminari - grape-swagger (0.27.3) - grape (>= 0.16.2) - grape-swagger-entity (0.2.5) - grape-entity (>= 0.5.0) - grape-swagger (>= 0.20.4) - guard (2.15.0) + grape-swagger (1.3.1) + grape (~> 1.3) + grape-swagger-entity (0.5.1) + grape-entity (>= 0.6.0) + grape-swagger (>= 1.2.0) + guard (2.18.0) formatador (>= 0.2.4) listen (>= 2.7, < 4.0) lumberjack (>= 1.0.12, < 2.0) nenv (~> 0.1) notiffany (~> 0.0) - pry (>= 0.9.12) + pry (>= 0.13.0) shellany (~> 0.0) thor (>= 0.18.1) guard-compat (1.2.1) @@ -279,7 +347,7 @@ GEM guard (~> 2.1) guard-compat (~> 1.1) rspec (>= 2.99.0, < 4.0) - haml (5.0.4) + haml (5.2.2) temple (>= 0.8.0) tilt hashie (3.5.7) @@ -288,38 +356,38 @@ GEM hashr (2.0.1) htmlentities (4.3.4) httpclient (2.8.3) - i18n (1.5.3) + i18n (1.13.0) concurrent-ruby (~> 1.0) ice_nine (0.11.2) - image_optim (0.26.3) + image_optim (0.31.3) exifr (~> 1.2, >= 1.2.2) fspath (~> 3.0) - image_size (>= 1.5, < 3) + image_size (>= 1.5, < 4) in_threads (~> 1.3) progress (~> 3.0, >= 3.0.1) image_optim_pack (0.4.0) fspath (>= 2.1, < 4) image_optim (~> 0.19) image_processing (0.11.2) - image_size (2.0.0) - in_threads (1.5.1) - interactor (3.1.1) - interactor-rails (2.2.0) + image_size (3.2.0) + in_threads (1.6.0) + interactor (3.1.2) + interactor-rails (2.2.1) interactor (~> 3.0) - rails (>= 4.2, < 5.3) + rails (>= 4.2) jasmine (2.99.0) jasmine-core (>= 2.99.0, < 3.0.0) phantomjs rack (>= 1.2.1) rake jasmine-core (2.99.2) - jasmine-rails (0.14.8) - jasmine-core (>= 1.3, < 3.0) + jasmine-rails (0.15.0) + jasmine-core (>= 1.3, < 4.0) phantomjs (>= 1.9) railties (>= 3.2.0) sprockets-rails - jmespath (1.4.0) - jquery-rails (4.3.3) + jmespath (1.6.2) + jquery-rails (4.3.5) rails-dom-testing (>= 1, < 3) railties (>= 4.2.0) thor (>= 0.14, < 2.0) @@ -328,7 +396,7 @@ GEM turbolinks jquery-ui-rails (6.0.1) railties (>= 3.2.16) - json (2.1.0) + json (2.6.3) json_spec (1.1.5) multi_json (~> 1.0) rspec (>= 2.0, < 4.0) @@ -341,52 +409,54 @@ GEM activesupport (>= 3.0.0) launchy (2.4.3) addressable (~> 2.3) - libv8 (6.7.288.46.1) - listen (3.1.5) - rb-fsevent (~> 0.9, >= 0.9.4) - rb-inotify (~> 0.9, >= 0.9.7) - ruby_dep (~> 1.2) - loofah (2.2.3) + libv8-node (15.14.0.1-x86_64-darwin-18) + listen (3.8.0) + rb-fsevent (~> 0.10, >= 0.10.3) + rb-inotify (~> 0.9, >= 0.9.10) + loofah (2.20.0) crass (~> 1.0.2) nokogiri (>= 1.5.9) - lumberjack (1.0.13) + lumberjack (1.2.8) mail (2.7.1) mini_mime (>= 0.1.1) material_design_lite-sass (1.3.0.1) autoprefixer-rails (>= 6.5) sass (>= 3.3) - metaclass (0.0.4) - method_source (0.8.2) + method_source (1.0.0) mime-types (3.1) mime-types-data (~> 3.2015) - mime-types-data (3.2018.0812) - mimemagic (0.3.3) - mini_magick (4.9.2) - mini_mime (1.0.1) + mime-types-data (3.2023.0218.1) + mimemagic (0.3.10) + nokogiri (~> 1) + rake + mini_magick (4.12.0) + mini_mime (1.1.2) mini_portile2 (2.4.0) - mini_racer (0.2.4) - libv8 (>= 6.3) - minitest (5.11.3) - mocha (1.8.0) - metaclass (~> 0.0.1) - multi_json (1.13.1) - multi_xml (0.6.0) - multipart-post (2.0.0) - mustermann (1.0.3) - mustermann-grape (1.0.0) - mustermann (~> 1.0.0) + mini_racer (0.4.0) + libv8-node (~> 15.14.0.0) + minitest (5.15.0) + mocha (1.16.1) + multi_json (1.15.0) + multipart-post (2.3.0) + mustermann (1.1.2) + ruby2_keywords (~> 0.0.1) + mustermann-grape (1.0.2) + mustermann (>= 1.0.0) nenv (0.3.0) + net-scp (4.0.0) + net-ssh (>= 2.6.5, < 8.0.0) + net-ssh (6.1.0) ng-rails-csrf (0.1.0) ngannotate-rails (1.2.2) execjs rails (>= 3.1) - nio4r (2.3.1) + nio4r (2.5.9) no_proxy_fix (0.1.2) - nokogiri (1.10.1) + nokogiri (1.10.10) mini_portile2 (~> 2.4.0) non-stupid-digest-assets (1.0.9) sprockets (>= 2.0) - notiffany (0.1.1) + notiffany (0.1.3) nenv (~> 0.1) shellany (~> 0.0) orm_adapter (0.5.0) @@ -399,8 +469,8 @@ GEM paperclip-optimizer (2.0.0) image_optim (~> 0.19) paperclip (>= 3.4) - paranoia (2.4.1) - activerecord (>= 4.0, < 5.3) + paranoia (2.4.3) + activerecord (>= 4.0, < 6.2) pg (0.20.0) phantomjs (2.1.1.0) poltergeist (1.18.1) @@ -408,26 +478,25 @@ GEM cliver (~> 0.3.1) websocket-driver (>= 0.2.0) pomona (0.7.0) - progress (3.5.0) - pry (0.10.4) - coderay (~> 1.1.0) - method_source (~> 0.8.1) - slop (~> 3.4) - pry-nav (0.2.4) - pry (>= 0.9.10, < 0.11.0) + progress (3.6.0) + pry (0.14.2) + coderay (~> 1.1) + method_source (~> 1.0) + pry-nav (1.0.0) + pry (>= 0.9.10, < 0.15) pry-rails (0.3.9) pry (>= 0.10.4) pry-remote (0.1.8) pry (~> 0.9) slop (~> 3.0) - pry-stack_explorer (0.4.9.3) - binding_of_caller (>= 0.7) - pry (>= 0.9.11) - public_suffix (3.0.3) + pry-stack_explorer (0.4.12) + binding_of_caller (~> 0.7) + pry (~> 0.13) + public_suffix (3.1.1) puma (3.8.2) pundit (1.1.0) activesupport (>= 3.0.0) - rack (2.0.6) + rack (2.2.7) rack-accept (0.4.5) rack (>= 0.4) rack-cors (0.4.1) @@ -437,43 +506,43 @@ GEM httpclient (>= 2.4) multi_json (>= 1.3.6) rack (>= 1.1) - rack-protection (2.0.5) + rack-protection (2.0.8.1) rack rack-test (0.6.3) rack (>= 1.0) - rails (5.0.7.1) - actioncable (= 5.0.7.1) - actionmailer (= 5.0.7.1) - actionpack (= 5.0.7.1) - actionview (= 5.0.7.1) - activejob (= 5.0.7.1) - activemodel (= 5.0.7.1) - activerecord (= 5.0.7.1) - activesupport (= 5.0.7.1) + rails (5.0.7.2) + actioncable (= 5.0.7.2) + actionmailer (= 5.0.7.2) + actionpack (= 5.0.7.2) + actionview (= 5.0.7.2) + activejob (= 5.0.7.2) + activemodel (= 5.0.7.2) + activerecord (= 5.0.7.2) + activesupport (= 5.0.7.2) bundler (>= 1.3.0) - railties (= 5.0.7.1) + railties (= 5.0.7.2) sprockets-rails (>= 2.0.0) rails-dom-testing (2.0.3) activesupport (>= 4.2.0) nokogiri (>= 1.6) - rails-erd (1.5.2) - activerecord (>= 3.2) - activesupport (>= 3.2) + rails-erd (1.7.2) + activerecord (>= 4.2) + activesupport (>= 4.2) choice (~> 0.2.0) ruby-graphviz (~> 1.2) - rails-html-sanitizer (1.0.4) - loofah (~> 2.2, >= 2.2.2) - railties (5.0.7.1) - actionpack (= 5.0.7.1) - activesupport (= 5.0.7.1) + rails-html-sanitizer (1.5.0) + loofah (~> 2.19, >= 2.19.1) + railties (5.0.7.2) + actionpack (= 5.0.7.2) + activesupport (= 5.0.7.2) method_source rake (>= 0.8.7) thor (>= 0.18.1, < 2.0) rainbow (2.2.2) rake - rake (12.3.2) - rb-fsevent (0.10.3) - rb-inotify (0.10.0) + rake (13.0.6) + rb-fsevent (0.11.2) + rb-inotify (0.10.1) ffi (~> 1.0) react_on_rails (6.5.1) addressable @@ -481,60 +550,65 @@ GEM execjs (~> 2.5) rails (>= 3.2) rainbow (~> 2.1) - redis (4.1.0) - redis-actionpack (5.0.2) - actionpack (>= 4.0, < 6) - redis-rack (>= 1, < 3) + redis (4.8.1) + redis-actionpack (5.3.0) + actionpack (>= 5, < 8) + redis-rack (>= 2.1.0, < 3) redis-store (>= 1.1.0, < 2) - redis-activesupport (5.0.7) - activesupport (>= 3, < 6) + redis-activesupport (5.3.0) + activesupport (>= 3, < 8) redis-store (>= 1.3, < 2) - redis-namespace (1.6.0) - redis (>= 3.0.4) - redis-rack (2.0.5) - rack (>= 1.5, < 3) + redis-namespace (1.10.0) + redis (>= 4) + redis-rack (2.1.4) + rack (>= 2.0.8, < 3) redis-store (>= 1.2, < 2) redis-rails (5.0.2) redis-actionpack (>= 5.0, < 6) redis-activesupport (>= 5.0, < 6) redis-store (>= 1.2, < 2) - redis-store (1.6.0) - redis (>= 2.2, < 5) - regexp_parser (1.3.0) - request_store (1.4.1) + redis-store (1.9.2) + redis (>= 4, < 6) + regexp_parser (1.8.2) + request_store (1.5.1) rack (>= 1.4) - responders (2.4.1) - actionpack (>= 4.2.0, < 6.0) - railties (>= 4.2.0, < 6.0) - rolify (5.2.0) - rspec (3.8.0) - rspec-core (~> 3.8.0) - rspec-expectations (~> 3.8.0) - rspec-mocks (~> 3.8.0) - rspec-core (3.8.0) - rspec-support (~> 3.8.0) - rspec-expectations (3.8.2) + responders (3.0.1) + actionpack (>= 5.0) + railties (>= 5.0) + rexml (3.2.5) + rolify (5.3.0) + rspec (3.9.0) + rspec-core (~> 3.9.0) + rspec-expectations (~> 3.9.0) + rspec-mocks (~> 3.9.0) + rspec-core (3.9.3) + rspec-support (~> 3.9.3) + rspec-expectations (3.9.4) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.8.0) - rspec-mocks (3.8.0) + rspec-support (~> 3.9.0) + rspec-mocks (3.9.1) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.8.0) - rspec-rails (3.8.2) + rspec-support (~> 3.9.0) + rspec-rails (3.9.1) actionpack (>= 3.0) activesupport (>= 3.0) railties (>= 3.0) - rspec-core (~> 3.8.0) - rspec-expectations (~> 3.8.0) - rspec-mocks (~> 3.8.0) - rspec-support (~> 3.8.0) - rspec-sidekiq (3.0.3) + rspec-core (~> 3.9.0) + rspec-expectations (~> 3.9.0) + rspec-mocks (~> 3.9.0) + rspec-support (~> 3.9.0) + rspec-sidekiq (3.1.0) rspec-core (~> 3.0, >= 3.0.0) sidekiq (>= 2.4.0) - rspec-support (3.8.0) - ruby-graphviz (1.2.4) - ruby_dep (1.5.0) - rubyzip (1.2.2) - sass (3.7.3) + rspec-support (3.9.4) + ruby-graphviz (1.2.5) + rexml + ruby2_keywords (0.0.5) + rubyzip (1.2.4) + rvm1-capistrano3 (1.4.0) + capistrano (~> 3.0) + sshkit (>= 1.2) + sass (3.7.4) sass-listen (~> 4.0.0) sass-listen (4.0.0) rb-fsevent (~> 0.9, >= 0.9.4) @@ -545,30 +619,29 @@ GEM sprockets (>= 2.8, < 4.0) sprockets-rails (>= 2.0, < 4.0) tilt (>= 1.1, < 3) - sentry-raven (2.9.0) - faraday (>= 0.7.6, < 1.0) + sentry-raven (3.1.2) + faraday (>= 1.0) shellany (0.0.1) - shoulda-matchers (3.1.2) + shoulda-matchers (3.1.3) activesupport (>= 4.0.0) - shrine (2.14.0) + shrine (2.19.4) content_disposition (~> 1.0) - down (~> 4.1) + down (>= 4.1, < 6) sidekiq (5.0.5) concurrent-ruby (~> 1.0) connection_pool (~> 2.2, >= 2.2.0) rack-protection (>= 1.5.0) redis (>= 3.3.4, < 5) - simplecov (0.16.1) + simplecov (0.18.5) docile (~> 1.1) - json (>= 1.8, < 3) - simplecov-html (~> 0.10.0) - simplecov-html (0.10.2) - sinatra (2.0.5) + simplecov-html (~> 0.11) + simplecov-html (0.12.3) + sinatra (2.0.8.1) mustermann (~> 1.0) rack (~> 2.0) - rack-protection (= 2.0.5) + rack-protection (= 2.0.8.1) tilt (~> 2.0) - six (0.2.1) + six (0.2.2) slop (3.6.0) sprockets (3.7.1) concurrent-ruby (~> 1.0) @@ -577,16 +650,23 @@ GEM actionpack (>= 4.0) activesupport (>= 4.0) sprockets (>= 3.0.0) - temple (0.8.0) - thor (0.19.4) + sshkit (1.21.4) + net-scp (>= 1.1.2) + net-ssh (>= 2.8.0) + temple (0.8.2) + thin (1.8.2) + daemons (~> 1.0, >= 1.0.9) + eventmachine (~> 1.0, >= 1.0.4) + rack (>= 1, < 3) + thor (0.20.3) thread_safe (0.3.6) - tilt (2.0.9) - timecop (0.9.1) - transitions (1.2.1) + tilt (2.1.0) + timecop (0.9.6) + transitions (1.3.0) turbolinks (5.0.1) turbolinks-source (~> 5) turbolinks-source (5.2.0) - tzinfo (1.2.5) + tzinfo (1.2.11) thread_safe (~> 0.1) uber (0.1.0) uglifier (3.2.0) @@ -596,11 +676,11 @@ GEM coercible (~> 1.0) descendants_tracker (~> 0.0, >= 0.0.3) equalizer (~> 0.0, >= 0.0.9) - warden (1.2.8) - rack (>= 2.0.6) + warden (1.2.9) + rack (>= 2.0.9) websocket-driver (0.6.5) websocket-extensions (>= 0.1.0) - websocket-extensions (0.1.3) + websocket-extensions (0.1.5) xpath (3.2.0) nokogiri (~> 1.8) yt (0.30.1) @@ -609,7 +689,7 @@ GEM yt-support (0.1.3) PLATFORMS - ruby + x86_64-darwin-18 DEPENDENCIES acts-as-taggable-on (~> 4.0) @@ -619,6 +699,7 @@ DEPENDENCIES awesome_nested_set! aws-sdk (~> 2.9) bcrypt (~> 3.1.11) + bcrypt_pbkdf (~> 1.1) better_errors binding_of_caller bootscale @@ -626,7 +707,12 @@ DEPENDENCIES bourbon (~> 4.3) bower-rails (~> 0.11.0) breadcrumbs_on_rails (~> 3.0.1) + bundler (= 2.3.26) byebug + capistrano (~> 3.10) + capistrano-npm + capistrano-rails (~> 1.3) + capistrano-thin (~> 2.0.0) capybara cells (~> 4.1.6) cells-haml (~> 0.0.10) @@ -636,10 +722,12 @@ DEPENDENCIES cortex-plugins-core (= 0.12.4) database_cleaner (~> 1.5) deep_cloneable (~> 2.2.2) - devise (~> 4.2.1) + devise (~> 4.8.1) dialog-polyfill-rails (~> 0.4.5) doorkeeper (~> 4.2) + dotenv (~> 2.6, >= 2.6.0) dotenv-rails + ed25519 (~> 1.3) elasticsearch-extensions (~> 0.0.26) elasticsearch-model (~> 5.0) elasticsearch-rails (~> 5.0) @@ -654,11 +742,11 @@ DEPENDENCIES font-awesome-sass (~> 4.7.0) foreman gon (~> 6.1.0) - grape (~> 0.19.2) - grape-entity (~> 0.6.1) + grape! + grape-entity grape-kaminari (~> 0.1.9) - grape-swagger (~> 0.27.3) - grape-swagger-entity (~> 0.2.1) + grape-swagger + grape-swagger-entity guard-jasmine (~> 2.1) guard-rspec (~> 4.7) haml (~> 5.0) @@ -677,6 +765,7 @@ DEPENDENCIES kaminari (~> 0.17.0) material_design_lite-sass (~> 1.3.0) mime-types (~> 3.1.0) + mimemagic (~> 0.3.9) mini_racer mocha (~> 1.2) ng-rails-csrf (~> 0.1.0) @@ -708,6 +797,7 @@ DEPENDENCIES rspec-rails (~> 3.5) rspec-sidekiq (~> 3.0) rubyzip (~> 1.2.1) + rvm1-capistrano3 sass-rails (~> 5.0) sentry-raven shoulda-matchers (~> 3.1) @@ -717,6 +807,7 @@ DEPENDENCIES six (~> 0.2.0) sprockets (= 3.7.1) sprockets-rails (= 3.2.0) + thin timecop (~> 0.8) transitions (~> 1.2) turbolinks (~> 5.0.1) @@ -728,4 +819,4 @@ RUBY VERSION ruby 2.4.5p335 BUNDLED WITH - 1.17.3 + 2.3.26 diff --git a/README.md b/README.md index ba87c0e9b..f34eece3a 100644 --- a/README.md +++ b/README.md @@ -175,21 +175,31 @@ The admin interface should now be accessible locally on port `3000`. To access C ### Deployment -To use an automated tool to deploy the server, set this environmental variable: +Capistrano is used to deploy the application. +It requires the IP address for the server and the pem keyfile for access. +Following configuration is required: -```shell -CI=true +1. Edit 'config/deploy/staging.rb' and set the following values: ``` +set :staging_ip, '' +set :staging_key_path, '' +``` +2. Capistrano commands mini-cheatsheet +``` +# Deploy the application +cap staging deploy -This will suppress Bower's interactive request to enable insights/metrics reporting, which normally prevents the CI process from continuing. +# Restart thin web-server +cap staging thin:restart -Additionally, deploying the `development` environment as a non-local server will require an additional environmental variable be set: +# Restart Sidekiq +cap staging sidekiq:restart -```shell -DEPLOYED=true +# Rollback to the previous version +cap staging deploy:rollback ``` -This will configure various things, such as [dotenv](https://github.com/bkeepers/dotenv) to behave normally in a deployed scenario. +Analogous changes can be done for production environment. ## Running Test Suite diff --git a/app/api/v1/resources/webpages.rb b/app/api/v1/resources/webpages.rb index 7e26fd2b0..982d66106 100644 --- a/app/api/v1/resources/webpages.rb +++ b/app/api/v1/resources/webpages.rb @@ -5,6 +5,7 @@ class Webpages < Grape::API resource :webpages do include Grape::Kaminari + include Grape::Extensions::Hashie::Mash::ParamBuilder helpers ::V1::Helpers::WebpagesHelper paginate per_page: 25, max_per_page: 1000 @@ -70,9 +71,10 @@ class Webpages < Grape::API if params[:seo_keyword_list] webpage.seo_keyword_list = params[:seo_keyword_list] end + webpage.user = current_user! webpage.update!(update_params.to_hash) - CacheBustWebpageJob.perform_later(webpage.url) + CacheBustWebpageJob.perform_now(webpage.url) present webpage, with: ::V1::Entities::Webpage, full: true end diff --git a/app/assets/legacy_templates/media/new.html b/app/assets/legacy_templates/media/new.html index 065bf541c..6142e2406 100644 --- a/app/assets/legacy_templates/media/new.html +++ b/app/assets/legacy_templates/media/new.html @@ -1,5 +1,5 @@
-
+
diff --git a/config/application.rb b/config/application.rb index 2587cfa20..c2986adca 100644 --- a/config/application.rb +++ b/config/application.rb @@ -17,6 +17,7 @@ class Application < Rails::Application config.active_job.queue_adapter = :sidekiq config.assets.image_optim = false config.assets.paths << Rails.root.join('vendor', 'assets', 'bower_components') + config.assets.paths << Rails.root.join('bower_components') ActsAsTaggableOn.remove_unused_tags = true ActsAsTaggableOn.force_lowercase = true diff --git a/config/deploy.rb b/config/deploy.rb new file mode 100644 index 000000000..7a5a00a43 --- /dev/null +++ b/config/deploy.rb @@ -0,0 +1,126 @@ +# config valid for current version and patch releases of Capistrano +lock '~> 3.17.2' + +set :application, 'cortex' +set :repo_url, 'https://github.com/cortex-cms/cortex.git' +set :deploy_to, "/var/www/#{fetch :application}" +set :s3_path_stage, 's3://cortex-env/Stage/.env' +set :s3_path_prod, '' + +# RVM options +set :rvm1_ruby_version, "2.4.5" +set :rvm_type, :user +set :default_env, { rvm_bin_path: '~/.rvm/bin' } + +# NPM options +set :npm_flags, '--silent --no-progress' # default +set :npm_roles, :all # default +set :npm_env_variables, {} # default +set :npm_method, 'ci' # default + +# Sidekiq options +set :sidekiq_roles, :all +set :sidekiq_config_path, 'config/sidekiq.yml' +set :sidekiq_log_path, 'log/sidekiq.log' +set :sidekiq_pid_path, 'tmp/pids/sidekiq.pid' + +before 'deploy', 'rvm1:install:rvm' +before 'deploy', 'rvm1:install:ruby' +after 'npm:install', 'remote:application_setup' +after 'deploy:publishing', 'thin:restart' +after 'deploy:publishing', 'sidekiq:restart' + +# Rollback specific hooks +after 'deploy:reverting', 'remote:application_setup' + +# Default branch is :master +# ask :branch, `git rev-parse --abbrev-ref HEAD`.chomp + +# Default deploy_to directory is /var/www/my_app_name +# set :deploy_to, "/var/www/my_app_name" + +# Default value for :format is :airbrussh. +# set :format, :airbrussh + +# You can configure the Airbrussh format using :format_options. +# These are the defaults. +# set :format_options, command_output: true, log_file: "log/capistrano.log", color: :auto, truncate: :auto + +# Default value for :pty is false +# set :pty, true + +# Default value for :linked_files is [] +# append :linked_files, "config/database.yml", 'config/master.key' +# append :linked_files, 'start.sh' + +# Default value for linked_dirs is [] +# append :linked_dirs, "log", "tmp/pids", "tmp/cache", "tmp/sockets", "tmp/webpacker", "public/system", "vendor", "storage" +append :linked_dirs, 'log', 'tmp/pids', 'tmp/cache', 'tmp/sockets', 'vendor', 'bower_components' + +# Default value for default_env is {} +# set :default_env, { path: "/opt/ruby/bin:$PATH" } + +# Default value for local_user is ENV['USER'] +# set :local_user, -> { `git config user.name`.chomp } + +# Default value for keep_releases is 5 +set :keep_releases, 5 + +# Uncomment the following to require manually verifying the host key before first deploy. +set :ssh_options, verify_host_key: :always + +namespace :remote do + desc 'Download env from S3' + task :env_download do + on roles(:all) do |host| + execute "aws s3 cp #{fetch :s3_path_stage} #{fetch :release_path}/.env" + end + end + + desc 'Application setup' + task :application_setup do + on roles(:all) do |host| + within release_path do + execute :gem, 'update --system 3.2.3' + execute :gem, 'install bundler -v 2.3.26' + execute :bundle, 'install' + execute :npm, 'install' + execute "source #{fetch :release_path}/.env" + execute "rm -Rf #{fetch :release_path}/public/assets/*.*" + execute :bundle, 'exec rake assets:clean' + execute :bundle, 'exec rake react_on_rails:assets:clobber' + execute "cd #{fetch :release_path}; #{fetch :release_path}/node_modules/.bin/bower install angular-mocks#1.2" + execute :bundle, 'exec rake cortex:assets:webpack:compile' + execute :bundle, 'exec rake assets:precompile' + end + execute "cd #{fetch :release_path}" + end + end + before :application_setup, 'rvm1:hook' + before :application_setup, 'env_download' +end + +namespace :sidekiq do + commands = [:start, :stop, :restart] + + commands.each do |command| + desc "sidekiq #{command}" + task command do + on roles(fetch(:sidekiq_roles, :app)), in: :sequence, wait: 5 do + within current_path do + config_file = fetch(:sidekiq_config_path) + log_file = fetch(:sidekiq_log_path) + pid_path = fetch(:sidekiq_pid_path) + if [:stop, :restart].include? command + deploy_path = fetch(:deploy_to) + execute :bundle, "exec sidekiqctl stop #{deploy_path}/shared/#{pid_path} 0" + end + if [:start, :restart].include? command + execute :bundle, "exec sidekiq -d --config #{config_file} --log #{log_file} -P #{pid_path}" + end + end + end + end + before command, 'rvm1:hook' + end +end diff --git a/config/deploy/production.rb b/config/deploy/production.rb new file mode 100644 index 000000000..0a3f0863a --- /dev/null +++ b/config/deploy/production.rb @@ -0,0 +1,61 @@ +# server-based syntax +# ====================== +# Defines a single server with a list of roles and multiple properties. +# You can define all roles on a single server, or split them: + +# server "example.com", user: "deploy", roles: %w{app db web}, my_property: :my_value +# server "example.com", user: "deploy", roles: %w{app web}, other_property: :other_value +# server "db.example.com", user: "deploy", roles: %w{db} + + + +# role-based syntax +# ================== + +# Defines a role with one or multiple servers. The primary server in each +# group is considered to be the first unless any hosts have the primary +# property set. Specify the username and a domain or IP for the server. +# Don't use `:all`, it's a meta role. + +# role :app, %w{deploy@example.com}, my_property: :my_value +# role :web, %w{user1@primary.com user2@additional.com}, other_property: :other_value +# role :db, %w{deploy@example.com} + + + +# Configuration +# ============= +# You can set any configuration variable like in config/deploy.rb +# These variables are then only loaded and set in this stage. +# For available Capistrano configuration variables see the documentation page. +# http://capistranorb.com/documentation/getting-started/configuration/ +# Feel free to add new variables to customise your setup. + + + +# Custom SSH Options +# ================== +# You may pass any option but keep in mind that net/ssh understands a +# limited set of options, consult the Net::SSH documentation. +# http://net-ssh.github.io/net-ssh/classes/Net/SSH.html#method-c-start +# +# Global options +# -------------- +# set :ssh_options, { +# keys: %w(/home/user_name/.ssh/id_rsa), +# forward_agent: false, +# auth_methods: %w(password) +# } +# +# The server-based syntax can be used to override options: +# ------------------------------------ +# server "example.com", +# user: "user_name", +# roles: %w{web app}, +# ssh_options: { +# user: "user_name", # overrides user setting above +# keys: %w(/home/user_name/.ssh/id_rsa), +# forward_agent: false, +# auth_methods: %w(publickey password) +# # password: "please use keys" +# } diff --git a/config/deploy/staging.rb b/config/deploy/staging.rb new file mode 100644 index 000000000..c4f0e36db --- /dev/null +++ b/config/deploy/staging.rb @@ -0,0 +1,71 @@ +# server-based syntax +# ====================== +# Defines a single server with a list of roles and multiple properties. +# You can define all roles on a single server, or split them: + +# server "example.com", user: "deploy", roles: %w{app db web}, my_property: :my_value +# server "example.com", user: "deploy", roles: %w{app web}, other_property: :other_value +# server "db.example.com", user: "deploy", roles: %w{db} + +set :branch, 'RDP-30318-ec2-downsize' +set :staging_ip, '34.232.151.154' +set :staging_key_path, '/Users/sausharma/Keys/cortex-stage-saurabh.pem' +server fetch(:staging_ip), + user: 'ubuntu', + roles: %w{app db web}, + ssh_options: { + keys: %w( fetch(:staging_key_path) ), + forward_agent: false, + auth_methods: %w(publickey) + } + +# role-based syntax +# ================== + +# Defines a role with one or multiple servers. The primary server in each +# group is considered to be the first unless any hosts have the primary +# property set. Specify the username and a domain or IP for the server. +# Don't use `:all`, it's a meta role. + +# role :app, %w{deploy@example.com}, my_property: :my_value +# role :web, %w{user1@primary.com user2@additional.com}, other_property: :other_value +# role :db, %w{deploy@example.com} + + + +# Configuration +# ============= +# You can set any configuration variable like in config/deploy.rb +# These variables are then only loaded and set in this stage. +# For available Capistrano configuration variables see the documentation page. +# http://capistranorb.com/documentation/getting-started/configuration/ +# Feel free to add new variables to customise your setup. + + + +# Custom SSH Options +# ================== +# You may pass any option but keep in mind that net/ssh understands a +# limited set of options, consult the Net::SSH documentation. +# http://net-ssh.github.io/net-ssh/classes/Net/SSH.html#method-c-start +# +# Global options +# -------------- +# set :ssh_options, { +# keys: %w(/home/user_name/.ssh/id_rsa), +# forward_agent: false, +# auth_methods: %w(password) +# } +# +# The server-based syntax can be used to override options: +# ------------------------------------ +# server "example.com", +# user: "user_name", +# roles: %w{web app}, +# ssh_options: { +# user: "user_name", # overrides user setting above +# keys: %w(/home/user_name/.ssh/id_rsa), +# forward_agent: false, +# auth_methods: %w(publickey password) +# # password: "please use keys" +# } diff --git a/config/initializers/dotenv.rb b/config/initializers/dotenv.rb new file mode 100644 index 000000000..630f4bbb8 --- /dev/null +++ b/config/initializers/dotenv.rb @@ -0,0 +1 @@ +Dotenv.load Rails.root.join('.env') \ No newline at end of file diff --git a/config/initializers/paperclip.rb b/config/initializers/paperclip.rb index ae0bd7c7d..15b8584a7 100644 --- a/config/initializers/paperclip.rb +++ b/config/initializers/paperclip.rb @@ -1,13 +1,27 @@ module Paperclip class HashieMashUploadedFileAdapter < AbstractAdapter + attr_accessor :original_filename + def initialize(target) @tempfile, @content_type, @size = target.tempfile, target.type, target.tempfile.size self.original_filename = target.filename end + end + class HashUploadedFileAdapter < AbstractAdapter + attr_accessor :original_filename + + def initialize(target) + @tempfile, @content_type, @size = target[:tempfile], target[:type], target[:tempfile].size + self.original_filename = target[:filename] + end end end Paperclip.io_adapters.register Paperclip::HashieMashUploadedFileAdapter do |target| target.is_a? Hashie::Mash end + +Paperclip.io_adapters.register Paperclip::HashUploadedFileAdapter do |target| + target.is_a?(Hash) && target[:tempfile].is_a?(Tempfile) +end diff --git a/config/initializers/paperclip_optimizer.rb b/config/initializers/paperclip_optimizer.rb index 92b1f41f6..2c78936e5 100644 --- a/config/initializers/paperclip_optimizer.rb +++ b/config/initializers/paperclip_optimizer.rb @@ -17,10 +17,11 @@ optipng: false, pngcrush: false, pngout: false, + oxipng: false, pngquant: { allow_lossy: true, quality: 33..50, speed: 3 }, - svgo: false + svgo: false } diff --git a/config/secrets.yml b/config/secrets.yml index a06374a92..c3807b32a 100644 --- a/config/secrets.yml +++ b/config/secrets.yml @@ -13,6 +13,9 @@ development: secret_key_base: <%= ENV["SECRET_KEY_BASE"] %> +staging: + secret_key_base: <%= ENV["SECRET_KEY_BASE"] %> + test: secret_key_base: b32cc035d1b68446fcacf8b7106e92dcfaf538a07865e61b795f912cfa6c9a6e2c87f7f6cc5924b5ea3793c3baad82284a91418ed2e4db0e263c616304cab463 diff --git a/config/thin.yml b/config/thin.yml new file mode 100644 index 000000000..6549358f5 --- /dev/null +++ b/config/thin.yml @@ -0,0 +1,12 @@ +pid: tmp/pids/thin.pid +timeout: 30 +wait: 30 +log: log/thin.log +max_conns: 1024 +require: [] +max_persistent_conns: 512 +servers: 1 +threaded: true +no-epoll: true +daemonize: true +socket: tmp/web_server.sock \ No newline at end of file diff --git a/config/thin/staging.yml b/config/thin/staging.yml new file mode 100644 index 000000000..4eab1e3b9 --- /dev/null +++ b/config/thin/staging.yml @@ -0,0 +1,13 @@ +pid: tmp/pids/thin.pid +timeout: 30 +wait: 30 +log: log/thin.log +max_conns: 1024 +require: [] +environment: staging +max_persistent_conns: 512 +servers: 1 +threaded: true +no-epoll: true +daemonize: true +socket: /tmp/web_server.sock \ No newline at end of file diff --git a/tmp/.keep b/tmp/.keep deleted file mode 100644 index e69de29bb..000000000