From f4605ac423e3652ef4fd667a0e7e10fafebca838 Mon Sep 17 00:00:00 2001 From: Igor Steinmacher Date: Tue, 13 Aug 2019 18:59:16 -0700 Subject: [PATCH] adding changes to fix the pipeline --- Gemfile | 4 +--- config/application.rb | 2 +- config/deploy.rb | 29 ++++++++++------------------- 3 files changed, 12 insertions(+), 23 deletions(-) diff --git a/Gemfile b/Gemfile index a12239c35..3f07c7726 100644 --- a/Gemfile +++ b/Gemfile @@ -3,7 +3,7 @@ gem 'rails', '~> 5.0.0' gem 'savon' gem 'activeresource', github: 'rails/activeresource', branch: 'master' # Use sqlite3 as the database for Active Record -gem 'sqlite3' +gem 'sqlite3', '~> 1.3.6' #Login Authorization gem 'omniauth-facebook' gem 'omniauth-twitter' @@ -61,7 +61,5 @@ end group :development, :test do gem "factory_bot_rails" gem 'mina', require: false - gem 'mina-puma', require: false, github: 'untitledkingdom/mina-puma' - gem 'mina-nginx', :require => false gem "spring" end diff --git a/config/application.rb b/config/application.rb index 3101d4898..52effbd0e 100644 --- a/config/application.rb +++ b/config/application.rb @@ -15,7 +15,7 @@ module Flosscoach # config.i18n.default_locale = "pt-BR" # Do not swallow errors in after_commit/after_rollback callbacks. config.assets.paths << Rails.root.join("app", "assets", "fonts") - config.active_record.raise_in_transactional_callbacks = true + #config.active_record.raise_in_transactional_callbacks = true config.autoload_paths += %W(#{config.root}/app/models/widgets) config.autoload_paths += %W(#{config.root}/app/models/comments) diff --git a/config/deploy.rb b/config/deploy.rb index 559fac4a3..dfdb7b2d0 100644 --- a/config/deploy.rb +++ b/config/deploy.rb @@ -1,8 +1,6 @@ -require 'mina/rails' require 'mina/git' require 'mina/rvm' # for rvm support. (https://rvm.io) -require 'mina/puma' -require 'mina/nginx' +require 'mina/rails' # Basic settings: # domain - The hostname to SSH to. @@ -12,19 +10,20 @@ require 'mina/nginx' set :application_name, 'flosscoach' set :application, fetch(:application_name) -set :domain, 'flosscoach.com' set :user, fetch(:application_name) -set :deploy_to, "/home/#{fetch(:user)}/app" -set :repository, 'https://gitlab.com/flosscoach/flosscoach.git' -set :branch, 'master' set :rvm_use_path, '/home/flosscoach/.rvm/scripts/rvm' -set :nginx_socket_path, '/home/flosscoach/app/shared/tmp/sockets/puma.sock' set :current_path, '/home/flosscoach/app/current' +set :domain, 'flosscoach.com' +set :repository, 'https://gitlab.com/flosscoach/flosscoach.git' +set :branch, 'master' +set :deploy_to, "/home/#{fetch(:user)}/app" + + # Optional settings: -set :user, 'flosscoach' # Username in the server to SSH to. -set :port, '22' # SSH port number. -set :forward_agent, true # SSH forward_agent. +#set :user, 'flosscoach' # Username in the server to SSH to. +#set :port, '22' # SSH port number. +#set :forward_agent, true # SSH forward_agent. # Shared dirs and files will be symlinked into the app-folder by the 'deploy:link_shared_paths' step. # Some plugins already add folders to shared_dirs like `mina/rails` add `public/assets`, `vendor/bundle` and many more @@ -62,14 +61,6 @@ task :deploy do invoke :'rails:db_migrate' invoke :'rails:assets_precompile' invoke :'deploy:cleanup' - - on :launch do - in_path(fetch(:current_path)) do - command %{mkdir -p tmp/} - command %{touch tmp/restart.txt} - invoke :'puma:phased_restart' - end - end end # you can use `run :local` to run tasks on local machine before of after the deploy scripts -- GitLab