Add healthcheck. Fixes #11
All checks were successful
Test Pull Requests / Build Image (pull_request) Successful in 7m49s
Test Pull Requests / Notify (pull_request) Successful in 2s

This commit is contained in:
MrMeeb 2024-04-19 17:08:31 +00:00
parent 7494997fc1
commit 3b24ec1cbe
2 changed files with 8 additions and 12 deletions

View File

@ -34,17 +34,6 @@ RUN echo "${DOCKER_PRUNE_INTERVAL} echo Pruning docker volumes && docker volume
# Remove warning from supervisord about running as root
RUN sed -i '/\[supervisord\]/a user=root' /etc/supervisord.conf
# Add stdout/stderr logs for docker
RUN sed -i '/\[program:dockerd\]/a stdout_logfile_maxbytes=0' /etc/supervisord.conf && \
sed -i '/\[program:dockerd\]/a stdout_logfile=/dev/fd/1' /etc/supervisord.conf && \
sed -i '/\[program:dockerd\]/a redirect_stderr=true' /etc/supervisord.conf
# Add Cron to supervisord
RUN echo "" >> /etc/supervisord.conf && \
echo "[program:cron]" >> /etc/supervisord.conf && \
echo "command=/usr/sbin/crond -f" >> /etc/supervisord.conf && \
echo "stdout_logfile=/dev/fd/1" >> /etc/supervisord.conf && \
echo "stdout_logfile_maxbytes=0" >> /etc/supervisord.conf && \
echo "redirect_stderr=true" >> /etc/supervisord.conf
HEALTHCHECK --interval=30s --timeout=15s --start-period=30s --retries=3 CMD "/healthcheck.sh"
ENTRYPOINT ["/usr/bin/supervisord", "-c", "/etc/supervisord.conf"]

7
root/healthcheck.sh Normal file
View File

@ -0,0 +1,7 @@
#!/bin/bash
# Check docker socket is running
ls -l /run | grep docker.sock
# Check act is running
/usr/bin/supervisorctl status act_runner | grep RUNNING