diff --git a/config/deploy.rb b/config/deploy.rb deleted file mode 100644 index e69de29bb..000000000 diff --git a/config/deploy/production.rb b/config/deploy/production.rb deleted file mode 100644 index a66a65c01..000000000 --- a/config/deploy/production.rb +++ /dev/null @@ -1,55 +0,0 @@ -# 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/rlisowski/.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 deleted file mode 100644 index a66a65c01..000000000 --- a/config/deploy/staging.rb +++ /dev/null @@ -1,55 +0,0 @@ -# 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/rlisowski/.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/nginx.conf b/config/nginx.conf deleted file mode 100644 index d1838012a..000000000 --- a/config/nginx.conf +++ /dev/null @@ -1,54 +0,0 @@ -ssl_certificate /etc/letsencrypt/live/mysite.com/fullchain.pem; -ssl_certificate_key /etc/letsencrypt/live/mysite.com/privkey.pem; - -upstream puma { - server unix:///home/deploy/apps/chatwoot/shared/tmp/sockets/chatwoot-puma.sock; -} - -server { - listen 80; - server_name api.chatwoot.com; - return 301 https://api.chatwoot.com$request_uri; -} - - -server { - listen 443 ssl; - server_name api.chatwoot.com; - - root /home/deploy/apps/chatwoot/current/public; - ssl_protocols TLSv1 TLSv1.1 TLSv1.2; - ssl_ciphers EECDH+AES128:RSA+AES128:EECDH+AES256:RSA+AES256:EECDH+3DES:RSA+3DES:!MD5; - ssl_prefer_server_ciphers on; - ssl_stapling on; - ssl_stapling_verify on; - ssl_session_cache shared:SSL:128m; - ssl_session_timeout 120m; - - access_log /home/deploy/apps/chatwoot/current/log/nginx.access.log; - error_log /home/deploy/apps/chatwoot/current/log/nginx.error.log info; - - location ^~ /assets/ { - gzip_static on; - expires max; - add_header Cache-Control public; - } - - location ~ /.well-known { - allow all; - root /usr/share/nginx/html; - } - - try_files $uri/index.html $uri @puma; - location @puma { - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header Host $http_host; - proxy_redirect off; - - proxy_pass http://puma; - } - - error_page 500 502 503 504 /500.html; - client_max_body_size 10M; - keepalive_timeout 10; -} \ No newline at end of file diff --git a/deploy/after_restart.rb b/deploy/after_restart.rb deleted file mode 100644 index d3f5a12fa..000000000 --- a/deploy/after_restart.rb +++ /dev/null @@ -1 +0,0 @@ - diff --git a/deploy/before_migrate.rb b/deploy/before_migrate.rb deleted file mode 100644 index d6eabc539..000000000 --- a/deploy/before_migrate.rb +++ /dev/null @@ -1,7 +0,0 @@ -Chef::Log.debug '==================> inside before_migrate <==================' - -shared_path = '/srv/www/chatwoot/shared' - -# yml files -run "ln -nfs #{shared_path}/config/application.yml #{release_path}/config/application.yml" -run "ln -nfs #{shared_path}/config/reports_redis.yml #{release_path}/config/reports_redis.yml" diff --git a/deploy/before_restart.rb b/deploy/before_restart.rb deleted file mode 100644 index e69de29bb..000000000 diff --git a/deploy/before_symlink.rb b/deploy/before_symlink.rb deleted file mode 100644 index 075ade898..000000000 --- a/deploy/before_symlink.rb +++ /dev/null @@ -1,50 +0,0 @@ -if %w[application sidekiq whenever].include? node[:opsworks][:instance][:layers].first - rails_env = new_resource.environment['RAILS_ENV'] - shared_path = "#{new_resource.deploy_to}/shared" - - # key is rails app path, value is shared directory path - directories = { - 'public/assets' => 'assets', - 'tmp/cache' => 'tmp/cache' - } - - # creating directories and symlinking - directories.each do |_release_path, _shared_path| - directory "#{shared_path}/#{_shared_path}" do - mode 0o770 - action :create - recursive true - not_if do - Dir.exist?("#{shared_path}/#{_shared_path}") - end - end - - link "#{release_path}/#{_release_path}" do - to "#{shared_path}/#{_shared_path}" - end - end - - if node[:opsworks][:instance][:layers].first.eql?('application') - # precompile assets into public/assets (which is symlinked to shared assets folder) - # execute "rake assets:precompile" do - # cwd release_path - # command "bundle exec rake assets:precompile --trace" - # environment 'RAILS_ENV' => rails_env - # end - - # migrations - if (node[:opsworks][:layers] && node[:opsworks][:layers]['application']) && - (endnode[:opsworks][:layers]['application'][:instances]) - master_node = node[:opsworks][:layers]['application'][:instances].keys.min - end - - if master_node && :node[:opsworks][:instance][:hostname].include?(master_node) - execute 'rake db:migrate' do - cwd release_path - command 'bundle exec rake db:migrate --trace' - environment 'RAILS_ENV' => rails_env - end - end - end - -end