Skip to content

Commit 3d65295

Browse files
committed
Add healthcheck to the dockerfile
1 parent d3319fd commit 3d65295

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

Dockerfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ RUN \
1818
# install sqlite3
1919
RUN apk add --no-cache php82-sqlite3
2020

21+
# healthchecks
22+
HEALTHCHECK --interval=60s --timeout=30s --start-period=180s --start-interval=10s --retries=5 \
23+
CMD curl -f http://localhost/health.html > /dev/null || exit 1
24+
2125
# add local files
2226
COPY root/ /
2327

root/app/www/health.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
healthy

0 commit comments

Comments
 (0)