Closed serv closed 2 months ago
@serv - before the failed healthcheck message you've posted, you should have the output from the container logs. See https://github.com/basecamp/kamal/blob/67a86e1068d312b80726890805328d0958609534/lib/kamal/cli/healthcheck.rb#L12.
Did you see anything there?
Hi Kamal team,
When I ran
kamal setup
, I got the message saying the healthcheck has failed.This is too generic and unactionable. A more helpful error should not only show that health check has failed, but why the health check failed by displaying the error message that would've printed, if you ran
./bin/rails s
locally.I was able to dubug what the real issue is by running the command to manually start the docker app image like:
docker run --detach --name healthcheck-kamal-rails-pg-tutorial-ccc7f8046c5feaa21e3cd52b9c69fed49dbd413c_uncommitted_ba1a020121f126ac --publish 3999:3000 --label service=healthcheck-kamal-rails-pg-tutorial -e KAMAL_CONTAINER_NAME="healthcheck-kamal-rails-pg-tutorial" --env-file .kamal/env/roles/kamal-rails-pg-tutorial-web.env azuretutorials.azurecr.io/serv/kamal-rails-pg-tutorial:ccc7f8046c5feaa21e3cd52b9c69fed49dbd413c_uncommitted_ba1a020121f126ac