Skip to content

Commit

Permalink
Merge pull request #412 from sozialhelden/feature/ping-file-for-healt…
Browse files Browse the repository at this point in the history
…hchecks

Add ping file for healthchecks
  • Loading branch information
Andrew Hobden authored Oct 5, 2016
2 parents 87878fc + fc148fe commit ca0636c
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 ca0636c

Please sign in to comment.