Skip to content

Commit

Permalink
fixup! fixup! fixup! fixup! Add stage env
Browse files Browse the repository at this point in the history
  • Loading branch information
kostyanf14 committed Sep 11, 2023
1 parent 841e511 commit affd18c
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions lib/capistrano/tasks/application.rake
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ namespace :application do
task :start do
on roles(:app), in: :sequence, wait: 5 do
within current_path do
if fetch(:rails_env) == 'staging'
if fetch(:rails_env) == :staging
execute 'sudo systemctl start stage-ikt.codelabs.site'
else
execute 'sudo systemctl start ikt.codelabs.site'
Expand All @@ -16,7 +16,7 @@ namespace :application do
task :stop do
on roles(:app), in: :sequence, wait: 5 do
within current_path do
if fetch(:rails_env) == 'staging'
if fetch(:rails_env) == :staging
execute 'sudo systemctl stop stage-ikt.codelabs.site'
else
execute 'sudo systemctl stop ikt.codelabs.site'
Expand All @@ -29,10 +29,7 @@ namespace :application do
task :restart do
on roles(:app), in: :sequence, wait: 5 do
within current_path do
p fetch(:rails_env)
p Rails.env
p ENV['RAILS_ENV']
if Rails.env == 'staging'
if fetch(:rails_env) == :staging
execute 'sudo systemctl restart stage-ikt.codelabs.site'
else
execute 'sudo systemctl restart ikt.codelabs.site'
Expand Down

0 comments on commit affd18c

Please sign in to comment.