Skip to content

Commit

Permalink
Check response from php-fpm health check
Browse files Browse the repository at this point in the history
  • Loading branch information
NFarrington committed Mar 5, 2019
1 parent f91fc1a commit 26d43eb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 2 additions & 1 deletion docker/Dockerfile
Expand Up @@ -56,6 +56,7 @@ RUN apk add --update --no-cache --virtual build-dependencies \
&& apk del build-dependencies

RUN mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini"
COPY ./docker/app-fpm.conf /usr/local/etc/php-fpm.d/app-fpm.conf

WORKDIR /var/www/html

Expand Down Expand Up @@ -100,7 +101,7 @@ HEALTHCHECK --start-period=15s --interval=30s --timeout=5s \
SCRIPT_NAME=/ping \
SCRIPT_FILENAME=/ping \
REQUEST_METHOD=GET \
cgi-fcgi -bind -connect 127.0.0.1:9000 || exit 1
cgi-fcgi -bind -connect 127.0.0.1:9000 | tee /dev/stderr | grep pong || exit 1

COPY ./docker/php-fpm-entrypoint.sh /var/www/html/entrypoint.sh
ENTRYPOINT ["/var/www/html/entrypoint.sh"]
Expand Down
3 changes: 3 additions & 0 deletions docker/app-fpm.conf
@@ -0,0 +1,3 @@
[www]

ping.path=/ping

0 comments on commit 26d43eb

Please sign in to comment.