From e10174c8f1d86a8a39391e22d3d1a860e3d1ac32 Mon Sep 17 00:00:00 2001 From: Andrew Hobden Date: Tue, 4 Oct 2016 09:08:48 +0000 Subject: [PATCH] Add ping file for healthchecks --- config/deploy.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/config/deploy.rb b/config/deploy.rb index 9b89eda2e..d747c4551 100644 --- a/config/deploy.rb +++ b/config/deploy.rb @@ -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