From 5b96d401a9319adc4bfcfdc3c8e543fac4a6059a Mon Sep 17 00:00:00 2001 From: Adam Heinz Date: Wed, 2 Nov 2022 13:22:43 -0400 Subject: [PATCH] [IMP] Odoo 15.0-17.0: Add support for docker healthcheck. --- 15.0/Dockerfile | 1 + 16.0/Dockerfile | 1 + 17.0/Dockerfile | 1 + 3 files changed, 3 insertions(+) diff --git a/15.0/Dockerfile b/15.0/Dockerfile index 262d2890a..332feadeb 100644 --- a/15.0/Dockerfile +++ b/15.0/Dockerfile @@ -75,6 +75,7 @@ VOLUME ["/var/lib/odoo", "/mnt/extra-addons"] # Expose Odoo services EXPOSE 8069 8071 8072 +HEALTHCHECK CMD curl --fail http://localhost:8069/web/health && curl --fail http://localhost:8072/longpolling/health || exit 1 # Set the default config file ENV ODOO_RC /etc/odoo/odoo.conf diff --git a/16.0/Dockerfile b/16.0/Dockerfile index 0949ef24a..fcdb1f550 100644 --- a/16.0/Dockerfile +++ b/16.0/Dockerfile @@ -89,6 +89,7 @@ VOLUME ["/var/lib/odoo", "/mnt/extra-addons"] # Expose Odoo services EXPOSE 8069 8071 8072 +HEALTHCHECK CMD curl --fail http://localhost:8069/web/health && curl --fail http://localhost:8072/websocket/health || exit 1 # Set the default config file ENV ODOO_RC /etc/odoo/odoo.conf diff --git a/17.0/Dockerfile b/17.0/Dockerfile index ba8ba8908..ccc644506 100644 --- a/17.0/Dockerfile +++ b/17.0/Dockerfile @@ -91,6 +91,7 @@ VOLUME ["/var/lib/odoo", "/mnt/extra-addons"] # Expose Odoo services EXPOSE 8069 8071 8072 +HEALTHCHECK CMD curl --fail http://localhost:8069/web/health && curl --fail http://localhost:8072/websocket/health || exit 1 # Set the default config file ENV ODOO_RC /etc/odoo/odoo.conf