From 30af8096cf95abfb210cfe2f6183c9d5b8392bf3 Mon Sep 17 00:00:00 2001
From: jonasled <1-jonasled@users.noreply.gitlab.jonasled.de>
Date: Fri, 16 Jul 2021 13:40:49 +0000
Subject: [PATCH] add healthcheck

---
 Dockerfile | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/Dockerfile b/Dockerfile
index 4f6a800..5ff8fb6 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -36,6 +36,12 @@ COPY --from=composer /build/public /var/www/html
 # |--------------------------------------------------------------------------
 RUN a2enmod headers rewrite
 
+# |--------------------------------------------------------------------------
+# | enable metrics
+# |--------------------------------------------------------------------------
+RUN apt update && apt install curl
+HEALTHCHECK CMD curl --fail http://localhost || exit 1  
+
 # |--------------------------------------------------------------------------
 # | expose http port
 # |--------------------------------------------------------------------------