deploy
Signed-off-by: Jeff <jeff@gotenzing.com>
Showing
12 changed files
with
142 additions
and
86 deletions
.bundle/config
0 → 100644
Gemfile
0 → 100644
Gemfile.lock
0 → 100644
| 1 | GEM | ||
| 2 | remote: https://rubygems.org/ | ||
| 3 | specs: | ||
| 4 | airbrussh (1.3.0) | ||
| 5 | sshkit (>= 1.6.1, != 1.7.0) | ||
| 6 | capistrano (3.10.1) | ||
| 7 | airbrussh (>= 1.0.0) | ||
| 8 | i18n | ||
| 9 | rake (>= 10.0.0) | ||
| 10 | sshkit (>= 1.9.0) | ||
| 11 | capistrano-composer (0.0.6) | ||
| 12 | capistrano (>= 3.0.0.pre) | ||
| 13 | concurrent-ruby (1.0.5) | ||
| 14 | i18n (0.9.3) | ||
| 15 | concurrent-ruby (~> 1.0) | ||
| 16 | net-scp (1.2.1) | ||
| 17 | net-ssh (>= 2.6.5) | ||
| 18 | net-ssh (4.2.0) | ||
| 19 | rake (12.3.0) | ||
| 20 | sshkit (1.15.1) | ||
| 21 | net-scp (>= 1.1.2) | ||
| 22 | net-ssh (>= 2.8.0) | ||
| 23 | |||
| 24 | PLATFORMS | ||
| 25 | ruby | ||
| 26 | |||
| 27 | DEPENDENCIES | ||
| 28 | capistrano (~> 3.10) | ||
| 29 | capistrano-composer | ||
| 30 | |||
| 31 | BUNDLED WITH | ||
| 32 | 1.15.1 |
| 1 | set :application, 'explore-the-bruce' | 1 | set :application, 'svi-staging' |
| 2 | set :repo_url, 'git@git.gotenzing.com:Jeremy/explore-the-bruce.git' | 2 | set :repo_url, 'git@git.gotenzing.com:Jeremy/stellervista-Intranet.git' |
| 3 | 3 | ||
| 4 | # Branch options | 4 | # Branch options |
| 5 | # Prompts for the branch name (defaults to current branch) | 5 | # Prompts for the branch name (defaults to current branch) |
| ... | @@ -7,107 +7,119 @@ set :repo_url, 'git@git.gotenzing.com:Jeremy/explore-the-bruce.git' | ... | @@ -7,107 +7,119 @@ set :repo_url, 'git@git.gotenzing.com:Jeremy/explore-the-bruce.git' |
| 7 | 7 | ||
| 8 | # Hardcodes branch to always be master | 8 | # Hardcodes branch to always be master |
| 9 | # This could be overridden in a stage config file | 9 | # This could be overridden in a stage config file |
| 10 | set :branch, "production" | 10 | set :branch, :master |
| 11 | 11 | ||
| 12 | 12 | ||
| 13 | set :keep_releases, 2 | 13 | set :keep_releases, 2 |
| 14 | set :deploy_to, -> { "/var/www/html/#{fetch(:application)}" } | 14 | set :deploy_to, -> { "/var/www/html/production/#{fetch(:application)}" } |
| 15 | 15 | ||
| 16 | # Use :debug for more verbose output when troubleshooting | 16 | # Use :debug for more verbose output when troubleshooting |
| 17 | set :log_level, :info | 17 | set :log_level, :info |
| 18 | 18 | ||
| 19 | |||
| 19 | # Put all shared files/directories here (e.g. uploads that need to go on the NFS drive) | 20 | # Put all shared files/directories here (e.g. uploads that need to go on the NFS drive) |
| 20 | set :linked_files, fetch(:linked_files, []).push('.env', '.htaccess') | 21 | set :linked_files, fetch(:linked_files, []).push('.env') |
| 21 | set :linked_dirs, fetch(:linked_dirs, []).push('wp-content/wflogs','wp-content/uploads', 'wp-content/storage', 'wp-content/cache') | 22 | set :linked_dirs, fetch(:linked_dirs, []).push('wp-content/wflogs','wp-content/uploads', 'wp-content/storage', 'wp-content/languages', 'wp-content/cache' , 'wp-content/wp-rocket-config') |
| 22 | |||
| 23 | # namespace :deploy do | ||
| 24 | # desc 'Sync servers' | ||
| 25 | # task :sync do | ||
| 26 | # on roles(:web), in: :sequence, wait: 5 do | ||
| 27 | # execute("si #{fetch(:application)}") | ||
| 28 | # end | ||
| 29 | # end | ||
| 30 | # end | ||
| 31 | 23 | ||
| 32 | # namespace :deploy do | ||
| 33 | # desc 'Sync servers' | ||
| 34 | # task :sync_again do | ||
| 35 | # on roles(:web), in: :sequence, wait: 5 do | ||
| 36 | # execute("si #{fetch(:application)}") | ||
| 37 | # end | ||
| 38 | # end | ||
| 39 | # end | ||
| 40 | 24 | ||
| 41 | # namespace :deploy do | 25 | namespace :deploy do |
| 42 | # desc 'Install composer packages' | 26 | desc 'Sync servers' |
| 43 | # task :install_theme_packages do | 27 | task :sync do |
| 44 | # on roles(:web), in: :sequence, wait: 5 do | 28 | on roles(:web), in: :sequence, wait: 5 do |
| 45 | # execute "cd '#{release_path}'; /usr/bin/php70 /home/tenzing_www/bin/composer install --no-dev --prefer-dist --no-interaction --quiet --optimize-autoloader" | 29 | execute("si #{fetch(:application)}") |
| 46 | # end | 30 | end |
| 47 | # end | 31 | end |
| 48 | # end | 32 | end |
| 33 | |||
| 34 | namespace :deploy do | ||
| 35 | desc 'Sync servers' | ||
| 36 | task :sync_again do | ||
| 37 | on roles(:web), in: :sequence, wait: 5 do | ||
| 38 | execute("si #{fetch(:application)}") | ||
| 39 | end | ||
| 40 | end | ||
| 41 | end | ||
| 49 | 42 | ||
| 50 | # namespace :deploy do | ||
| 51 | # desc 'Install composer packages' | ||
| 52 | # task :install_theme_packages do | ||
| 53 | # on roles(:web), in: :sequence, wait: 5 do | ||
| 54 | # execute "cd '#{release_path}/wp-content/themes/commonwell-corp'; /usr/bin/php70 /home/tenzing_www/bin/composer install --no-dev --prefer-dist --no-interaction --quiet --optimize-autoloader" | ||
| 55 | # end | ||
| 56 | # end | ||
| 57 | # end | ||
| 58 | 43 | ||
| 44 | namespace :deploy do | ||
| 45 | desc 'Install composer packages' | ||
| 46 | task :install_theme_packages do | ||
| 47 | on roles(:web), in: :sequence, wait: 5 do | ||
| 48 | execute "cd '#{release_path}/wp-content/themes/understrap-child'; /usr/bin/php74 /home/tenzing_www/bin/composer install --no-dev --prefer-dist --no-interaction --quiet --optimize-autoloader" | ||
| 49 | end | ||
| 50 | end | ||
| 51 | end | ||
| 52 | |||
| 53 | |||
| 54 | |||
| 55 | namespace :deploy do | ||
| 56 | desc 'Install composer packages in root' | ||
| 57 | task :install_packages do | ||
| 58 | on roles(:web), in: :sequence, wait: 5 do | ||
| 59 | execute "cd '#{release_path}'; /usr/bin/php74 /home/tenzing_www/composer.phar install --no-dev --prefer-dist --no-interaction --quiet --optimize-autoloader" | ||
| 60 | end | ||
| 61 | end | ||
| 62 | end | ||
| 59 | 63 | ||
| 60 | 64 | ||
| 61 | # Override `git#create_release` to handle submodules | 65 | # Override `git#create_release` to handle submodules |
| 62 | # namespace :git do | 66 | namespace :git do |
| 63 | # desc 'Copy repo to releases' | 67 | desc 'Copy repo to releases' |
| 64 | # task create_release: :'git:update' do | 68 | task create_release: :'git:update' do |
| 65 | # on roles(:all) do | 69 | on roles(:all) do |
| 66 | # with fetch(:git_environmental_variables) do | 70 | with fetch(:git_environmental_variables) do |
| 67 | # within repo_path do | 71 | within repo_path do |
| 68 | # execute :git, :clone, '-b', fetch(:branch), '--recursive', '.', release_path | 72 | execute :git, :clone, '-b', fetch(:branch), '--recursive', '.', release_path |
| 69 | # end | 73 | end |
| 70 | # end | 74 | end |
| 71 | # end | 75 | end |
| 72 | # end | 76 | end |
| 73 | # end | 77 | end |
| 74 | 78 | ||
| 75 | # The above restart task is not run by default | 79 | # The above restart task is not run by default |
| 76 | # Uncomment the following line to run it on deploys if needed | 80 | # Uncomment the following line to run it on deploys if needed |
| 77 | # after 'deploy:publishing', 'deploy:restart' | 81 | # after 'deploy:publishing', 'deploy:restart' |
| 78 | 82 | ||
| 79 | namespace :deploy do | 83 | namespace :deploy do |
| 80 | desc 'Remove Git Files' | 84 | desc 'Remove Git Files' |
| 81 | task :cleanup do | 85 | task :cleanup do |
| 82 | on roles(:web), in: :sequence, wait: 5 do | 86 | on roles(:web), in: :sequence, wait: 5 do |
| 83 | execute "cd '#{release_path}/'; rm -Rf .git/ " | 87 | execute "cd '#{release_path}/'; rm -Rf .git/ " |
| 84 | end | 88 | end |
| 85 | end | 89 | end |
| 86 | end | 90 | end |
| 87 | 91 | ||
| 92 | #namespace :deploy do | ||
| 93 | # desc 'set file permissions' | ||
| 94 | # task :set_permissions do | ||
| 95 | # on roles(:web), in: :sequence, wait: 5 do | ||
| 96 | # execute "cd '#{release_path}/'; chmod -Rf 777 .htaccess wordfence-waf.php wp-content/advanced-cache.php " | ||
| 97 | # end | ||
| 98 | # end | ||
| 99 | # end | ||
| 88 | 100 | ||
| 89 | 101 | ||
| 90 | 102 | ||
| 91 | # namespace :deploy do | 103 | namespace :deploy do |
| 92 | # desc 'Update WordPress template root paths to point to the new release' | 104 | desc 'Update WordPress template root paths to point to the new release' |
| 93 | # task :update_option_paths do | 105 | task :update_option_paths do |
| 94 | # on roles(:app) do | 106 | on roles(:app) do |
| 95 | # within fetch(:release_path) do | 107 | within fetch(:release_path) do |
| 96 | # if test :wp, :core, 'is-installed' | 108 | if test :wp, :core, 'is-installed' |
| 97 | # [:stylesheet_root, :template_root].each do |option| | 109 | [:stylesheet_root, :template_root].each do |option| |
| 98 | # # Only change the value if it's an absolute path | 110 | # Only change the value if it's an absolute path |
| 99 | # # i.e. The relative path "/themes" must remain unchanged | 111 | # i.e. The relative path "/themes" must remain unchanged |
| 100 | # # Also, the option might not be set, in which case we leave it like that | 112 | # Also, the option might not be set, in which case we leave it like that |
| 101 | # value = capture :wp, :option, :get, option, raise_on_non_zero_exit: false | 113 | value = capture :wp, :option, :get, option, raise_on_non_zero_exit: false |
| 102 | # if value != '' && value != '/themes' | 114 | if value != '' && value != '/themes' |
| 103 | # execute :wp, :option, :set, option, fetch(:release_path).join('web/wp/wp-content/themes') | 115 | execute :wp, :option, :set, option, fetch(:release_path).join('web/wp/wp-content/themes') |
| 104 | # end | 116 | end |
| 105 | # end | 117 | end |
| 106 | # end | 118 | end |
| 107 | # end | 119 | end |
| 108 | # end | 120 | end |
| 109 | # end | 121 | end |
| 110 | # end | 122 | end |
| 111 | 123 | ||
| 112 | 124 | ||
| 113 | 125 | ||
| ... | @@ -115,7 +127,7 @@ end | ... | @@ -115,7 +127,7 @@ end |
| 115 | # Note that you need to have WP-CLI installed on your server | 127 | # Note that you need to have WP-CLI installed on your server |
| 116 | # Uncomment the following line to run it on deploys if needed | 128 | # Uncomment the following line to run it on deploys if needed |
| 117 | # after 'deploy:publishing', 'deploy:update_option_paths' | 129 | # after 'deploy:publishing', 'deploy:update_option_paths' |
| 118 | 130 | after 'deploy:updated', 'deploy:install_packages' | |
| 119 | # after 'deploy:updated', 'deploy:install_theme_packages' | 131 | after 'deploy:updated', 'deploy:sync' |
| 120 | # after 'deploy:updated', 'deploy:sync' | 132 | #after 'deploy:updated', 'deploy:set_permissions' |
| 121 | # after 'deploy:finished', 'deploy:sync_again' | 133 | after 'deploy:finished', 'deploy:sync_again' | ... | ... |
| ... | @@ -3,8 +3,7 @@ set :branch, "master" | ... | @@ -3,8 +3,7 @@ set :branch, "master" |
| 3 | 3 | ||
| 4 | # Simple Role Syntax | 4 | # Simple Role Syntax |
| 5 | # ================== | 5 | # ================== |
| 6 | role :web, %w{jeremy@can-1} | 6 | role :web, %w{tenzing_www@web-1} |
| 7 | |||
| 8 | 7 | ||
| 9 | 8 | ||
| 10 | # you can set custom ssh options | 9 | # you can set custom ssh options | ... | ... |
| ... | @@ -14330,10 +14330,13 @@ figure.woocommerce-product-gallery__wrapper { | ... | @@ -14330,10 +14330,13 @@ figure.woocommerce-product-gallery__wrapper { |
| 14330 | } | 14330 | } |
| 14331 | .hero-content p { | 14331 | .hero-content p { |
| 14332 | color: #fff; | 14332 | color: #fff; |
| 14333 | font-size: 20px; | 14333 | font-size: 16px; |
| 14334 | line-height: 28px; | 14334 | line-height: 28px; |
| 14335 | margin-bottom: 25px; | 14335 | margin-bottom: 25px; |
| 14336 | } | 14336 | } |
| 14337 | .hero-content h1 + p, .hero-content .h1 + p { | ||
| 14338 | font-size: 20px; | ||
| 14339 | } | ||
| 14337 | 14340 | ||
| 14338 | #wrapper-footer { | 14341 | #wrapper-footer { |
| 14339 | background-color: #183668; | 14342 | background-color: #183668; |
| ... | @@ -14379,7 +14382,7 @@ figure.woocommerce-product-gallery__wrapper { | ... | @@ -14379,7 +14382,7 @@ figure.woocommerce-product-gallery__wrapper { |
| 14379 | bottom: 0; | 14382 | bottom: 0; |
| 14380 | left: 14%; | 14383 | left: 14%; |
| 14381 | width: 50%; | 14384 | width: 50%; |
| 14382 | height: 60px; | 14385 | height: 30px; |
| 14383 | z-index: 99; | 14386 | z-index: 99; |
| 14384 | } | 14387 | } |
| 14385 | .page-template-login .hero-content { | 14388 | .page-template-login .hero-content { | ... | ... |
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
-
Please register or sign in to post a comment