Skip to content

Commit 0ddccf1

Browse files
authored
Merge pull request #4777 from 0rlych1kk4/feat/docker-healthcheck-4564
docker: add container HEALTHCHECK
2 parents 463081e + 10315ac commit 0ddccf1

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

web/docker/Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,9 @@ RUN chmod 755 /usr/local/bin/wait-for
139139

140140
EXPOSE 8001
141141

142+
HEALTHCHECK --interval=30s --timeout=5s --start-period=20s --retries=3 \
143+
CMD python3 -c "import urllib.request; urllib.request.urlopen('http://127.0.0.1:8001/live', timeout=3).read()" || exit 1
144+
142145
ENTRYPOINT ["/tini", "--", "/usr/local/bin/entrypoint.sh"]
143146

144147
CMD ["CodeChecker", "server", "--workspace", "/workspace", "--not-host-only"]

0 commit comments

Comments
 (0)