Skip to content

Commit

Permalink
add healthcheck
Browse files Browse the repository at this point in the history
  • Loading branch information
WolfangAukang committed Oct 2, 2023
1 parent 402004c commit ec97507
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 1 deletion.
3 changes: 3 additions & 0 deletions simplerisk-minimal/generate_dockerfile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,9 @@ ENTRYPOINT [ "/entrypoint.sh" ]
EXPOSE 80
EXPOSE 443
HEALTHCHECK --interval=1m \\
CMD curl --fail http://localhost || exit 1
# Start Apache
CMD ["/usr/sbin/apache2ctl", "-D", "FOREGROUND"]
EOF
Expand Down
5 changes: 4 additions & 1 deletion simplerisk-minimal/php81/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ RUN echo 'upload_max_filesize = 5M' >> /usr/local/etc/php/conf.d/docker-php-uplo
echo 'log_errors = On' >> /usr/local/etc/php/conf.d/docker-php-error_logging.ini && \
echo 'error_log = /dev/stderr' >> /usr/local/etc/php/conf.d/docker-php-error_logging.ini && \
echo 'display_errors = Off' >> /usr/local/etc/php/conf.d/docker-php-error_logging.ini && \

# Create SSL Certificates for Apache SSL
echo $(< /dev/urandom tr -dc _A-Z-a-z-0-9 | head -c${1:-32}) > /tmp/pass_openssl.txt && \
mkdir -p /etc/apache2/ssl/ssl.crt /etc/apache2/ssl/ssl.key && \
Expand Down Expand Up @@ -94,5 +94,8 @@ ENTRYPOINT [ "/entrypoint.sh" ]
EXPOSE 80
EXPOSE 443

HEALTHCHECK --interval=1m \
CMD curl --fail http://localhost || exit 1

# Start Apache
CMD ["/usr/sbin/apache2ctl", "-D", "FOREGROUND"]
3 changes: 3 additions & 0 deletions simplerisk/generate_dockerfile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,9 @@ VOLUME [ "/passwords", "/configurations", "/var/log", "/var/lib/mysql", "/etc/ap
# Setting up entrypoint
ENTRYPOINT [ "/entrypoint.sh" ]
HEALTHCHECK --interval=1m \\
CMD curl --fail http://localhost || exit 1
# Start Apache and MySQL
CMD ["/usr/bin/supervisord", "-n", "-c", "/etc/supervisor/supervisord.conf"]
EOF
Expand Down
3 changes: 3 additions & 0 deletions simplerisk/jammy/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -109,5 +109,8 @@ VOLUME [ "/passwords", "/configurations", "/var/log", "/var/lib/mysql", "/etc/ap
# Setting up entrypoint
ENTRYPOINT [ "/entrypoint.sh" ]

HEALTHCHECK --interval=1m \
CMD curl --fail http://localhost || exit 1

# Start Apache and MySQL
CMD ["/usr/bin/supervisord", "-n", "-c", "/etc/supervisor/supervisord.conf"]

0 comments on commit ec97507

Please sign in to comment.