diff --git a/Capfile b/Capfile index da6929a8..38a2d8e1 100644 --- a/Capfile +++ b/Capfile @@ -1,10 +1,16 @@ # Load DSL and Setup Up Stages require 'capistrano/setup' -require 'capistrano/rbenv' # Includes default deployment tasks require 'capistrano/deploy' + +require 'capistrano/rbenv' +require 'capistrano/puma' +install_plugin Capistrano::Puma # Default puma tasks +require 'capistrano/puma/workers' +require 'capistrano/puma/jungle' require 'capistrano/bundler' +# require 'capistrano/nginx' require 'capistrano/rails/assets' require 'capistrano/rails/migrations' require 'capistrano/postgresql' @@ -29,12 +35,6 @@ install_plugin Capistrano::SCM::Git# # require 'capistrano/bundler' # require 'capistrano/rails/assets' # require 'capistrano/rails/migrations' -require 'capistrano/puma' -install_plugin Capistrano::Puma::Systemd -# install_plugin Capistrano::Puma # Default puma tasks -# require 'capistrano/puma/workers' -# require 'capistrano/puma/jungle' -# require 'capistrano/nginx' # Loads custom tasks from `lib/capistrano/tasks' if you have any defined. Dir.glob('lib/capistrano/tasks/*.cap').each { |r| import r } diff --git a/Gemfile b/Gemfile index 9cc57d4f..456ce400 100644 --- a/Gemfile +++ b/Gemfile @@ -31,7 +31,7 @@ group :development do gem 'capistrano-bundler' gem 'capistrano-rails' gem 'capistrano-rails-console' - gem 'capistrano3-puma' + gem 'capistrano3-puma', '~> 3' gem 'capistrano-rbenv' gem 'capistrano-nginx', github: 'koenpunt/capistrano-nginx' gem "capistrano-db-tasks", require: false diff --git a/Gemfile.lock b/Gemfile.lock index cfe4b96b..616c1247 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -88,10 +88,10 @@ GEM capistrano-rbenv (2.2.0) capistrano (~> 3.1) sshkit (~> 1.3) - capistrano3-puma (5.0.4) + capistrano3-puma (3.1.1) capistrano (~> 3.7) capistrano-bundler - puma (>= 4.0, < 6.0) + puma (~> 3.4) capybara (3.36.0) addressable matrix @@ -265,8 +265,7 @@ GEM interception (>= 0.5) pry (>= 0.12.0) public_suffix (4.0.6) - puma (5.5.2) - nio4r (~> 2.0) + puma (3.12.6) pundit (2.1.1) activesupport (>= 3.0.0) racc (1.6.0) @@ -435,7 +434,7 @@ DEPENDENCIES capistrano-rails capistrano-rails-console capistrano-rbenv - capistrano3-puma + capistrano3-puma (~> 3) capybara capybara-screenshot ci_reporter_rspec diff --git a/config/nginx/13.whitewizardweb.com.conf b/config/nginx/13.whitewizardweb.com.conf index 94a0a110..45ffb786 100644 --- a/config/nginx/13.whitewizardweb.com.conf +++ b/config/nginx/13.whitewizardweb.com.conf @@ -3,7 +3,7 @@ upstream thirteen_production { } server { - server_name 13.whitewizardweb.com; + server_name 13.whitewizardweb.com 13.24x7.hk 13.mounthoodlodge.com 13.my.to; root /home/jesse/srv/thirteen-tien-len_production/current/public; access_log /home/jesse/srv/thirteen-tien-len_production/shared/log/nginx.access.log; @@ -35,11 +35,12 @@ server { listen 443 ssl; # managed by Certbot - ssl_certificate /etc/letsencrypt/live/13.whitewizardweb.com/fullchain.pem; # managed by Certbot - ssl_certificate_key /etc/letsencrypt/live/13.whitewizardweb.com/privkey.pem; # managed by Certbot + ssl_certificate /etc/letsencrypt/live/13.24x7.hk/fullchain.pem; # managed by Certbot + ssl_certificate_key /etc/letsencrypt/live/13.24x7.hk/privkey.pem; # managed by Certbot include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot + } server { @@ -48,3 +49,18 @@ server { server_name 13.whitewizardweb.com; return 301 https://13.whitewizardweb.com$request_uri; } + + +server { + if ($host = 13.24x7.hk) { + return 301 https://$host$request_uri; + } # managed by Certbot + + + listen 80; + server_name 13.whitewizardweb.com 13.24x7.hk 13.mounthoodlodge.com 13.my.to; + return 404; # managed by Certbot + + +} +