From dc605f60bd48cb0c618b229a1e9ef35899c728b2 Mon Sep 17 00:00:00 2001 From: josep-tecnativa Date: Mon, 14 Oct 2024 10:03:24 +0200 Subject: [PATCH] [ADD] GeoIP version handling to avoid warnings --- 11.0.Dockerfile | 2 ++ 12.0.Dockerfile | 2 ++ 13.0.Dockerfile | 2 ++ 14.0.Dockerfile | 2 ++ 15.0.Dockerfile | 2 ++ 16.0.Dockerfile | 2 ++ 17.0.Dockerfile | 2 ++ 18.0.Dockerfile | 2 ++ conf.d/{60-geoip.conf => 60-geoip-ge17.conf} | 3 --- conf.d/60-geoip-lt17.conf | 2 ++ 10 files changed, 18 insertions(+), 3 deletions(-) rename conf.d/{60-geoip.conf => 60-geoip-ge17.conf} (58%) create mode 100644 conf.d/60-geoip-lt17.conf diff --git a/11.0.Dockerfile b/11.0.Dockerfile index 5347bd58..b1b01acb 100644 --- a/11.0.Dockerfile +++ b/11.0.Dockerfile @@ -107,6 +107,8 @@ RUN ln -s /usr/local/lib/python3.5/site-packages/doodbalib \ COPY build.d common/build.d COPY conf.d common/conf.d COPY entrypoint.d common/entrypoint.d +RUN rm -f /opt/odoo/common/conf.d/60-geoip-ge17.conf \ + && mv /opt/odoo/common/conf.d/60-geoip-lt17.conf /opt/odoo/common/conf.d/60-geoip.conf RUN mkdir -p auto/addons auto/geoip custom/src/private \ && ln /usr/local/bin/direxec common/entrypoint \ && ln /usr/local/bin/direxec common/build \ diff --git a/12.0.Dockerfile b/12.0.Dockerfile index 2bf063ba..b3e3f731 100644 --- a/12.0.Dockerfile +++ b/12.0.Dockerfile @@ -100,6 +100,8 @@ COPY lib/doodbalib /usr/local/lib/python3.5/site-packages/doodbalib COPY build.d common/build.d COPY conf.d common/conf.d COPY entrypoint.d common/entrypoint.d +RUN rm -f /opt/odoo/common/conf.d/60-geoip-ge17.conf \ + && mv /opt/odoo/common/conf.d/60-geoip-lt17.conf /opt/odoo/common/conf.d/60-geoip.conf RUN mkdir -p auto/addons auto/geoip custom/src/private \ && ln /usr/local/bin/direxec common/entrypoint \ && ln /usr/local/bin/direxec common/build \ diff --git a/13.0.Dockerfile b/13.0.Dockerfile index 7f4e0ef1..f8846cf4 100644 --- a/13.0.Dockerfile +++ b/13.0.Dockerfile @@ -73,6 +73,8 @@ COPY lib/doodbalib /usr/local/lib/python3.6/site-packages/doodbalib COPY build.d common/build.d COPY conf.d common/conf.d COPY entrypoint.d common/entrypoint.d +RUN rm -f /opt/odoo/common/conf.d/60-geoip-ge17.conf \ + && mv /opt/odoo/common/conf.d/60-geoip-lt17.conf /opt/odoo/common/conf.d/60-geoip.conf RUN mkdir -p auto/addons auto/geoip custom/src/private \ && ln /usr/local/bin/direxec common/entrypoint \ && ln /usr/local/bin/direxec common/build \ diff --git a/14.0.Dockerfile b/14.0.Dockerfile index 77fcdbad..b7b254e1 100644 --- a/14.0.Dockerfile +++ b/14.0.Dockerfile @@ -88,6 +88,8 @@ COPY lib/doodbalib /usr/local/lib/python3.8/site-packages/doodbalib COPY build.d common/build.d COPY conf.d common/conf.d COPY entrypoint.d common/entrypoint.d +RUN rm -f /opt/odoo/common/conf.d/60-geoip-ge17.conf \ + && mv /opt/odoo/common/conf.d/60-geoip-lt17.conf /opt/odoo/common/conf.d/60-geoip.conf RUN mkdir -p auto/addons auto/geoip custom/src/private \ && ln /usr/local/bin/direxec common/entrypoint \ && ln /usr/local/bin/direxec common/build \ diff --git a/15.0.Dockerfile b/15.0.Dockerfile index 1bb05d65..b6e83b88 100644 --- a/15.0.Dockerfile +++ b/15.0.Dockerfile @@ -87,6 +87,8 @@ COPY lib/doodbalib /usr/local/lib/python3.8/site-packages/doodbalib COPY build.d common/build.d COPY conf.d common/conf.d COPY entrypoint.d common/entrypoint.d +RUN rm -f /opt/odoo/common/conf.d/60-geoip-ge17.conf \ + && mv /opt/odoo/common/conf.d/60-geoip-lt17.conf /opt/odoo/common/conf.d/60-geoip.conf RUN mkdir -p auto/addons auto/geoip custom/src/private \ && ln /usr/local/bin/direxec common/entrypoint \ && ln /usr/local/bin/direxec common/build \ diff --git a/16.0.Dockerfile b/16.0.Dockerfile index 6ec59ab2..201b35fe 100644 --- a/16.0.Dockerfile +++ b/16.0.Dockerfile @@ -91,6 +91,8 @@ COPY lib/doodbalib /usr/local/lib/python3.10/site-packages/doodbalib COPY build.d common/build.d COPY conf.d common/conf.d COPY entrypoint.d common/entrypoint.d +RUN rm -f /opt/odoo/common/conf.d/60-geoip-ge17.conf \ + && mv /opt/odoo/common/conf.d/60-geoip-lt17.conf /opt/odoo/common/conf.d/60-geoip.conf RUN mkdir -p auto/addons auto/geoip custom/src/private \ && ln /usr/local/bin/direxec common/entrypoint \ && ln /usr/local/bin/direxec common/build \ diff --git a/17.0.Dockerfile b/17.0.Dockerfile index f8b196a9..bcb42ab3 100644 --- a/17.0.Dockerfile +++ b/17.0.Dockerfile @@ -90,6 +90,8 @@ COPY lib/doodbalib /usr/local/lib/python3.10/site-packages/doodbalib COPY build.d common/build.d COPY conf.d common/conf.d COPY entrypoint.d common/entrypoint.d +RUN rm -f /opt/odoo/common/conf.d/60-geoip-lt17.conf \ + && mv /opt/odoo/common/conf.d/60-geoip-ge17.conf /opt/odoo/common/conf.d/60-geoip.conf RUN mkdir -p auto/addons auto/geoip custom/src/private \ && ln /usr/local/bin/direxec common/entrypoint \ && ln /usr/local/bin/direxec common/build \ diff --git a/18.0.Dockerfile b/18.0.Dockerfile index 9bce3d99..f2e71f23 100644 --- a/18.0.Dockerfile +++ b/18.0.Dockerfile @@ -90,6 +90,8 @@ COPY lib/doodbalib /usr/local/lib/python3.10/site-packages/doodbalib COPY build.d common/build.d COPY conf.d common/conf.d COPY entrypoint.d common/entrypoint.d +RUN rm -f /opt/odoo/common/conf.d/60-geoip-lt17.conf \ + && mv /opt/odoo/common/conf.d/60-geoip-ge17.conf /opt/odoo/common/conf.d/60-geoip.conf RUN mkdir -p auto/addons auto/geoip custom/src/private \ && ln /usr/local/bin/direxec common/entrypoint \ && ln /usr/local/bin/direxec common/build \ diff --git a/conf.d/60-geoip.conf b/conf.d/60-geoip-ge17.conf similarity index 58% rename from conf.d/60-geoip.conf rename to conf.d/60-geoip-ge17.conf index 4ff56817..c624c604 100644 --- a/conf.d/60-geoip.conf +++ b/conf.d/60-geoip-ge17.conf @@ -1,6 +1,3 @@ [options] -; Used before v17 -geoip_database = /opt/odoo/auto/geoip/GeoLite2-City.mmdb -; Used in v17+ geoip_city_db = /opt/odoo/auto/geoip/GeoLite2-City.mmdb geoip_country_db = /opt/odoo/auto/geoip/GeoLite2-Country.mmdb diff --git a/conf.d/60-geoip-lt17.conf b/conf.d/60-geoip-lt17.conf new file mode 100644 index 00000000..1665f2c0 --- /dev/null +++ b/conf.d/60-geoip-lt17.conf @@ -0,0 +1,2 @@ +[options] +geoip_database = /opt/odoo/auto/geoip/GeoLite2-City.mmdb