From 6f4747304adcf1c9c583aca1b7b81804a795a176 Mon Sep 17 00:00:00 2001 From: sn0w Date: Thu, 5 Sep 2019 01:48:34 +0000 Subject: [PATCH] add basic healthcheck support --- Dockerfile | 9 +++++++++ config.dist.exs | 3 +++ 2 files changed, 12 insertions(+) diff --git a/Dockerfile b/Dockerfile index c117354..782bf12 100644 --- a/Dockerfile +++ b/Dockerfile @@ -79,3 +79,12 @@ RUN \ cp ./config/dev.exs ./config/prod.secret.exs && \ BUILDTIME=1 /entrypoint.sh && \ rm ./config/prod.secret.exs + +# Register healthcheck +# You might need to change these values on slow or busy servers. +HEALTHCHECK \ + --interval=10s \ + --start-period=50s \ + --timeout=4s \ + --retries=3 \ + CMD curl -sSLf http://localhost:4000/api/pleroma/healthcheck || exit 1 diff --git a/config.dist.exs b/config.dist.exs index e8bc4dd..dea0e02 100644 --- a/config.dist.exs +++ b/config.dist.exs @@ -30,6 +30,9 @@ config :pleroma, Pleroma.Repo, # You should not change this. config :pleroma, Pleroma.Uploaders.Local, uploads: "/uploads" +config :pleroma, :instance, + healthcheck: true + # # vvv Your awesome config options go here vvv #