Skip to content

Commit

Permalink
Fix richie healthcheck error
Browse files Browse the repository at this point in the history
The app_job richie health check wasn't ok, because after a couple of
days the container is cleaned/removed and the health check of the
app_job container started to raise an error.
GN-1162
  • Loading branch information
igobranco committed Apr 19, 2023
1 parent 83e2013 commit 6bb3eaa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion roles/richie_docker_deploy/templates/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ healthcheck-redis-port: ## check redis port
{% if config.deploy_job %}
# check if last job run has finished with complete stateand without any error
healthcheck-{{ _site }}_app_job: ## check if the migrate and bootstrap_elasticsearch django commands have finished with success for {{ _site }} site
@test $$(docker ps --filter "name={{ richie_docker_deploy_compose_name }}_{{ _site }}_app_job" -a | grep "Exited (0)" | wc -l) -eq 1 || ( echo "Check {{ _site }}_app_job with django migrate and bootstrap elasticsearch commands: error" ; exit 1)
@test $$(docker ps --filter "name={{ richie_docker_deploy_compose_name }}_{{ _site }}_app_job" -aq | wc -l) -eq 0 || test $$(docker ps --filter "name={{ richie_docker_deploy_compose_name }}_{{ _site }}_app_job" -a | grep "Exited (0)" | wc -l) -eq 1 || ( echo "Check {{ _site }}_app_job with django migrate and bootstrap elasticsearch commands: error" ; exit 1)
@echo "Check {{ _site }}_app_job with django migrate and bootstrap elasticsearch commands: OK"
.PHONY: healthcheck-{{ _site }}_app_job

Expand Down

0 comments on commit 6bb3eaa

Please sign in to comment.