Skip to content

Commit

Permalink
Add ping file for healthchecks
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Hobden committed Oct 7, 2016
1 parent dd8ea56 commit e10174c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions config/deploy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@
remote_dir = "#{host.user}@#{host.hostname}:#{release_path}/public/assets/"
execute "mkdir -p #{release_path}/public/assets/"
run_locally { execute "rsync -av --delete #{local_dir} #{remote_dir}" }
# We create this file so the consul health check will pass. We can't use an
# existing file since they are all unpredictably named.
execute "touch #{release_path}/public/assets/ping"

# stolen from https://github.com/capistrano/capistrano/blob/master/lib/capistrano/tasks/deploy.rake#L101
# we can't directly invoke the task since that runs on deploy roles only
Expand Down

0 comments on commit e10174c

Please sign in to comment.