Added healthcheck
This commit is contained in:
@@ -38,3 +38,7 @@ ENV TZ=Etc/UTC
|
||||
COPY etc/ /etc
|
||||
|
||||
WORKDIR /var/www/html
|
||||
|
||||
# Healthcheck
|
||||
HEALTHCHECK --interval=30s --timeout=5s --start-period=5s --retries=3 \
|
||||
CMD ["curl", "--fail", "http://localhost/healthcheck"]
|
||||
|
||||
@@ -32,6 +32,12 @@ server {
|
||||
server_name ${NGINX_HOST}
|
||||
index index.php index.htm;
|
||||
|
||||
location /healthcheck {
|
||||
access_log off;
|
||||
error_log off;
|
||||
return 200 'ok';
|
||||
}
|
||||
|
||||
location ~ \.php$ {
|
||||
include fastcgi_params;
|
||||
fastcgi_pass ${PHP_HOST}:9000;
|
||||
@@ -39,10 +45,17 @@ server {
|
||||
fastcgi_param REQUEST_METHOD $request_method;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root/$fastcgi_script_name;
|
||||
}
|
||||
|
||||
location /status {
|
||||
include fastcgi_params;
|
||||
fastcgi_pass ${PHP_HOST}:9000;
|
||||
fastcgi_param REQUEST_METHOD $request_method;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root/$fastcgi_script_name;
|
||||
}
|
||||
|
||||
location / {
|
||||
#try_files $uri $uri/ /index.php?$query_string =404;
|
||||
rewrite ^ index.php last;
|
||||
try_files $uri $uri/ /index.php?$query_string =404;
|
||||
#rewrite ^ index.php last;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user