From da5149947049f138e1f6bbfe14968173ccf6b713 Mon Sep 17 00:00:00 2001 From: Adrian Resua Vidal Date: Thu, 15 Jun 2023 10:08:49 +0200 Subject: [PATCH 1/8] [IMP] Updated Readme with root bash access --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index c322b01..5c73240 100644 --- a/README.md +++ b/README.md @@ -29,6 +29,7 @@ DOCKER CONTAINER - `docker ps` Show running containers - `docker ps -a` Show all containers - `docker exec -it bash` Opens the shell of the container +- `docker exec -it -u 0 bash` Opens the shell of the container as root user - `docker container rm ` Remove the specified container - `docker create ` Create a container based on the image - `docker create --name ` Create a container with the specified name based on the image From f811d16f2e54b3ce8f058608fdd0038171e20151 Mon Sep 17 00:00:00 2001 From: Adrian Resua Vidal Date: Thu, 15 Jun 2023 10:16:00 +0200 Subject: [PATCH 2/8] [IMP] Change odoo.conf and entrypoint user, changed command orders of venv --- odoo-15/odoo-prod/Dockerfile | 4 ++-- odoo-15/odoo-test/Dockerfile | 15 ++++++++------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/odoo-15/odoo-prod/Dockerfile b/odoo-15/odoo-prod/Dockerfile index e928516..cddcb55 100644 --- a/odoo-15/odoo-prod/Dockerfile +++ b/odoo-15/odoo-prod/Dockerfile @@ -80,8 +80,8 @@ RUN useradd --create-home --home-dir /opt/odoo --no-log-init odoo RUN echo "odoo:odoo" | chpasswd # Copy Odoo configuration & entrypoint files -COPY ./odoo.conf /opt/odoo -COPY ./entrypoint.sh /opt/odoo +COPY --chown="odoo:odoo" ./odoo.conf /opt/odoo +COPY --chown="odoo:odoo" ./entrypoint.sh /opt/odoo # Install latest postgresql-client RUN apt-get update \ diff --git a/odoo-15/odoo-test/Dockerfile b/odoo-15/odoo-test/Dockerfile index 044327a..0b8c9b6 100644 --- a/odoo-15/odoo-test/Dockerfile +++ b/odoo-15/odoo-test/Dockerfile @@ -80,8 +80,8 @@ RUN useradd --create-home --home-dir /opt/odoo --no-log-init odoo RUN echo "odoo:odoo" | chpasswd # Copy Odoo configuration & entrypoint files -COPY ./odoo.conf /opt/odoo -COPY ./entrypoint.sh /opt/odoo +COPY --chown="odoo:odoo" ./odoo.conf /opt/odoo +COPY --chown="odoo:odoo" ./entrypoint.sh /opt/odoo # Install latest postgresql-client RUN apt-get update \ @@ -102,6 +102,12 @@ USER odoo RUN /bin/bash -c "cd /opt/odoo && git clone https://github.com/odoo/odoo --branch 15.0 --single-branch --depth 1" RUN /bin/bash -c "mkdir -p /opt/odoo/custom-addons" +# Create Virtual Enviroment +RUN /bin/bash -c "cd /opt/odoo && virtualenv -p python3.8 venv" + +# Python dependencies +RUN /bin/bash -c "cd /opt/odoo && source venv/bin/activate && pip install -U setuptools && pip3 install -r /opt/odoo/odoo/requirements.txt && deactivate" + # Clone interesting OCA repositories RUN /bin/bash -c "cd /opt/odoo/custom-addons && git clone https://github.com/OCA/account-analytic -b 15.0 --single-branch --depth 1 account-analytic" RUN /bin/bash -c "cd /opt/odoo/custom-addons && git clone https://github.com/OCA/account-financial-reporting -b 15.0 --single-branch --depth 1 account-financial-reporting" @@ -135,8 +141,6 @@ RUN /bin/bash -c "cd /opt/odoo/custom-addons && git clone https://github.com/OCA RUN /bin/bash -c "cd /opt/odoo/custom-addons && git clone https://github.com/OCA/timesheet -b 15.0 --single-branch --depth 1 timesheet" RUN /bin/bash -c "cd /opt/odoo/custom-addons && git clone https://github.com/OCA/web -b 15.0 --single-branch --depth 1 web" -# Create Virtual Enviroment -RUN /bin/bash -c "cd /opt/odoo && virtualenv -p python3.8 venv" #OCA Dependencies RUN /bin/bash -c "cd /opt/odoo && source venv/bin/activate && pip install -r /opt/odoo/custom-addons/account-financial-tools/requirements.txt && deactivate" @@ -152,9 +156,6 @@ RUN /bin/bash -c "cd /opt/odoo && source venv/bin/activate && pip install -r /op # RUN /bin/bash -c "cd /opt/odoo && source venv/bin/activate && pip install -r /opt/odoo/custom-addons/web/requirements.txt && deactivate" # RUN /bin/bash -c "cd /opt/odoo && source venv/bin/activate && pip install -r /opt/odoo/custom-addons/server-tools/requirements.txt && deactivate" -# Python dependencies -RUN /bin/bash -c "cd /opt/odoo && source venv/bin/activate && pip install -U setuptools && pip3 install -r /opt/odoo/odoo/requirements.txt && deactivate" - VOLUME ["/opt/odoo"] # Expose Odoo services From 29d15e1ab679ed54a2088031c42e8ce81d87d214 Mon Sep 17 00:00:00 2001 From: Adrian Resua Vidal Date: Thu, 15 Jun 2023 10:34:03 +0200 Subject: [PATCH 3/8] [IMP] Added account payment to Dockerfile --- odoo-15/odoo-prod/Dockerfile | 2 ++ odoo-15/odoo-prod/odoo.conf | 2 +- odoo-15/odoo-test/Dockerfile | 2 ++ odoo-15/odoo-test/odoo.conf | 2 +- 4 files changed, 6 insertions(+), 2 deletions(-) diff --git a/odoo-15/odoo-prod/Dockerfile b/odoo-15/odoo-prod/Dockerfile index cddcb55..e305434 100644 --- a/odoo-15/odoo-prod/Dockerfile +++ b/odoo-15/odoo-prod/Dockerfile @@ -113,6 +113,7 @@ RUN /bin/bash -c "cd /opt/odoo/custom-addons && git clone https://github.com/OCA RUN /bin/bash -c "cd /opt/odoo/custom-addons && git clone https://github.com/OCA/account-financial-reporting -b 15.0 --single-branch --depth 1 account-financial-reporting" RUN /bin/bash -c "cd /opt/odoo/custom-addons && git clone https://github.com/OCA/account-financial-tools -b 15.0 --single-branch --depth 1 account-financial-tools" RUN /bin/bash -c "cd /opt/odoo/custom-addons && git clone https://github.com/OCA/account-invoicing -b 15.0 --single-branch --depth 1 account-invoicing" +RUN /bin/bash -c "cd /opt/odoo/custom-addons && git clone https://github.com/OCA/account-payment -b 15.0 --single-branch --depth 1 account-payment" RUN /bin/bash -c "cd /opt/odoo/custom-addons && git clone https://github.com/OCA/bank-payment -b 15.0 --single-branch --depth 1 bank-payment" RUN /bin/bash -c "cd /opt/odoo/custom-addons && git clone https://github.com/OCA/community-data-files -b 15.0 --single-branch --depth 1 community-data-files" RUN /bin/bash -c "cd /opt/odoo/custom-addons && git clone https://github.com/OCA/connector -b 15.0 --single-branch --depth 1 connector" @@ -144,6 +145,7 @@ RUN /bin/bash -c "cd /opt/odoo/custom-addons && git clone https://github.com/OCA #OCA Dependencies RUN /bin/bash -c "cd /opt/odoo && source venv/bin/activate && pip install -r /opt/odoo/custom-addons/account-financial-tools/requirements.txt && deactivate" # RUN /bin/bash -c "cd /opt/odoo && source venv/bin/activate && pip install -r /opt/odoo/custom-addons/bank-payment/requirements.txt && deactivate" +RUN /bin/bash -c "cd /opt/odoo && source venv/bin/activate && pip install -r /opt/odoo/custom-addons/account-payment/requirements.txt && deactivate" RUN /bin/bash -c "cd /opt/odoo && source venv/bin/activate && pip install -r /opt/odoo/custom-addons/community-data-files/requirements.txt && deactivate" RUN /bin/bash -c "cd /opt/odoo && source venv/bin/activate && pip install -r /opt/odoo/custom-addons/connector/requirements.txt && deactivate" # RUN /bin/bash -c "cd /opt/odoo && source venv/bin/activate && pip install -r /opt/odoo/custom-addons/edi/requirements.txt && deactivate" diff --git a/odoo-15/odoo-prod/odoo.conf b/odoo-15/odoo-prod/odoo.conf index 369d9c2..cd701a4 100644 --- a/odoo-15/odoo-prod/odoo.conf +++ b/odoo-15/odoo-prod/odoo.conf @@ -1,5 +1,5 @@ [options] -addons_path = /opt/odoo/odoo/addons,/opt/odoo/custom-addons/web,/opt/odoo/custom-addons/account-analytic,/opt/odoo/custom-addons/account-financial-reporting,/opt/odoo/custom-addons/account-financial-tools,/opt/odoo/custom-addons/account-invoicing,/opt/odoo/custom-addons/bank-payment,/opt/odoo/custom-addons/community-data-files,/opt/odoo/custom-addons/connector,/opt/odoo/custom-addons/crm,/opt/odoo/custom-addons/e-commerce,/opt/odoo/custom-addons/edi,/opt/odoo/custom-addons/field-service,/opt/odoo/custom-addons/l10n-spain,/opt/odoo/custom-addons/mis-builder,/opt/odoo/custom-addons/partner-contact,/opt/odoo/custom-addons/pos,/opt/odoo/custom-addons/product-attribute,/opt/odoo/custom-addons/purchase-reporting,/opt/odoo/custom-addons/purchase-workflow,/opt/odoo/custom-addons/queue,/opt/odoo/custom-addons/reporting-engine,/opt/odoo/custom-addons/sale-financial,/opt/odoo/custom-addons/sale-reporting,/opt/odoo/custom-addons/sale-workflow,/opt/odoo/custom-addons/server-ux,/opt/odoo/custom-addons/server-tools,/opt/odoo/custom-addons/stock-logistics-barcode,/opt/odoo/custom-addons/stock-logistics-reporting,/opt/odoo/custom-addons/stock-logistics-warehouse,/opt/odoo/custom-addons/stock-logistics-workflow,/opt/odoo/custom-addons/timesheet +addons_path = /opt/odoo/odoo/addons,/opt/odoo/custom-addons/web,/opt/odoo/custom-addons/account-analytic,/opt/odoo/custom-addons/account-payment,/opt/odoo/custom-addons/account-financial-reporting,/opt/odoo/custom-addons/account-financial-tools,/opt/odoo/custom-addons/account-invoicing,/opt/odoo/custom-addons/bank-payment,/opt/odoo/custom-addons/community-data-files,/opt/odoo/custom-addons/connector,/opt/odoo/custom-addons/crm,/opt/odoo/custom-addons/e-commerce,/opt/odoo/custom-addons/edi,/opt/odoo/custom-addons/field-service,/opt/odoo/custom-addons/l10n-spain,/opt/odoo/custom-addons/mis-builder,/opt/odoo/custom-addons/partner-contact,/opt/odoo/custom-addons/pos,/opt/odoo/custom-addons/product-attribute,/opt/odoo/custom-addons/purchase-reporting,/opt/odoo/custom-addons/purchase-workflow,/opt/odoo/custom-addons/queue,/opt/odoo/custom-addons/reporting-engine,/opt/odoo/custom-addons/sale-financial,/opt/odoo/custom-addons/sale-reporting,/opt/odoo/custom-addons/sale-workflow,/opt/odoo/custom-addons/server-ux,/opt/odoo/custom-addons/server-tools,/opt/odoo/custom-addons/stock-logistics-barcode,/opt/odoo/custom-addons/stock-logistics-reporting,/opt/odoo/custom-addons/stock-logistics-warehouse,/opt/odoo/custom-addons/stock-logistics-workflow,/opt/odoo/custom-addons/timesheet data_dir = /opt/odoo/odoo log_level = info ; admin_passwd = diff --git a/odoo-15/odoo-test/Dockerfile b/odoo-15/odoo-test/Dockerfile index 0b8c9b6..5d5adda 100644 --- a/odoo-15/odoo-test/Dockerfile +++ b/odoo-15/odoo-test/Dockerfile @@ -113,6 +113,7 @@ RUN /bin/bash -c "cd /opt/odoo/custom-addons && git clone https://github.com/OCA RUN /bin/bash -c "cd /opt/odoo/custom-addons && git clone https://github.com/OCA/account-financial-reporting -b 15.0 --single-branch --depth 1 account-financial-reporting" RUN /bin/bash -c "cd /opt/odoo/custom-addons && git clone https://github.com/OCA/account-financial-tools -b 15.0 --single-branch --depth 1 account-financial-tools" RUN /bin/bash -c "cd /opt/odoo/custom-addons && git clone https://github.com/OCA/account-invoicing -b 15.0 --single-branch --depth 1 account-invoicing" +RUN /bin/bash -c "cd /opt/odoo/custom-addons && git clone https://github.com/OCA/account-payment -b 15.0 --single-branch --depth 1 account-payment" RUN /bin/bash -c "cd /opt/odoo/custom-addons && git clone https://github.com/OCA/bank-payment -b 15.0 --single-branch --depth 1 bank-payment" RUN /bin/bash -c "cd /opt/odoo/custom-addons && git clone https://github.com/OCA/community-data-files -b 15.0 --single-branch --depth 1 community-data-files" RUN /bin/bash -c "cd /opt/odoo/custom-addons && git clone https://github.com/OCA/connector -b 15.0 --single-branch --depth 1 connector" @@ -145,6 +146,7 @@ RUN /bin/bash -c "cd /opt/odoo/custom-addons && git clone https://github.com/OCA #OCA Dependencies RUN /bin/bash -c "cd /opt/odoo && source venv/bin/activate && pip install -r /opt/odoo/custom-addons/account-financial-tools/requirements.txt && deactivate" # RUN /bin/bash -c "cd /opt/odoo && source venv/bin/activate && pip install -r /opt/odoo/custom-addons/bank-payment/requirements.txt && deactivate" +RUN /bin/bash -c "cd /opt/odoo && source venv/bin/activate && pip install -r /opt/odoo/custom-addons/account-payment/requirements.txt && deactivate" RUN /bin/bash -c "cd /opt/odoo && source venv/bin/activate && pip install -r /opt/odoo/custom-addons/community-data-files/requirements.txt && deactivate" RUN /bin/bash -c "cd /opt/odoo && source venv/bin/activate && pip install -r /opt/odoo/custom-addons/connector/requirements.txt && deactivate" # RUN /bin/bash -c "cd /opt/odoo && source venv/bin/activate && pip install -r /opt/odoo/custom-addons/edi/requirements.txt && deactivate" diff --git a/odoo-15/odoo-test/odoo.conf b/odoo-15/odoo-test/odoo.conf index 6c1bd0d..aab55b0 100644 --- a/odoo-15/odoo-test/odoo.conf +++ b/odoo-15/odoo-test/odoo.conf @@ -1,5 +1,5 @@ [options] -addons_path = /opt/odoo/odoo/addons,/opt/odoo/custom-addons/web,/opt/odoo/custom-addons/account-analytic,/opt/odoo/custom-addons/account-financial-reporting,/opt/odoo/custom-addons/account-financial-tools,/opt/odoo/custom-addons/account-invoicing,/opt/odoo/custom-addons/bank-payment,/opt/odoo/custom-addons/community-data-files,/opt/odoo/custom-addons/connector,/opt/odoo/custom-addons/crm,/opt/odoo/custom-addons/e-commerce,/opt/odoo/custom-addons/edi,/opt/odoo/custom-addons/field-service,/opt/odoo/custom-addons/l10n-spain,/opt/odoo/custom-addons/mis-builder,/opt/odoo/custom-addons/partner-contact,/opt/odoo/custom-addons/pos,/opt/odoo/custom-addons/product-attribute,/opt/odoo/custom-addons/purchase-reporting,/opt/odoo/custom-addons/purchase-workflow,/opt/odoo/custom-addons/queue,/opt/odoo/custom-addons/reporting-engine,/opt/odoo/custom-addons/sale-financial,/opt/odoo/custom-addons/sale-reporting,/opt/odoo/custom-addons/sale-workflow,/opt/odoo/custom-addons/server-ux,/opt/odoo/custom-addons/server-tools,/opt/odoo/custom-addons/stock-logistics-barcode,/opt/odoo/custom-addons/stock-logistics-reporting,/opt/odoo/custom-addons/stock-logistics-warehouse,/opt/odoo/custom-addons/stock-logistics-workflow,/opt/odoo/custom-addons/timesheet +addons_path = /opt/odoo/odoo/addons,/opt/odoo/custom-addons/web,/opt/odoo/custom-addons/account-analytic,/opt/odoo/custom-addons/account-payment,/opt/odoo/custom-addons/account-financial-reporting,/opt/odoo/custom-addons/account-financial-tools,/opt/odoo/custom-addons/account-invoicing,/opt/odoo/custom-addons/bank-payment,/opt/odoo/custom-addons/community-data-files,/opt/odoo/custom-addons/connector,/opt/odoo/custom-addons/crm,/opt/odoo/custom-addons/e-commerce,/opt/odoo/custom-addons/edi,/opt/odoo/custom-addons/field-service,/opt/odoo/custom-addons/l10n-spain,/opt/odoo/custom-addons/mis-builder,/opt/odoo/custom-addons/partner-contact,/opt/odoo/custom-addons/pos,/opt/odoo/custom-addons/product-attribute,/opt/odoo/custom-addons/purchase-reporting,/opt/odoo/custom-addons/purchase-workflow,/opt/odoo/custom-addons/queue,/opt/odoo/custom-addons/reporting-engine,/opt/odoo/custom-addons/sale-financial,/opt/odoo/custom-addons/sale-reporting,/opt/odoo/custom-addons/sale-workflow,/opt/odoo/custom-addons/server-ux,/opt/odoo/custom-addons/server-tools,/opt/odoo/custom-addons/stock-logistics-barcode,/opt/odoo/custom-addons/stock-logistics-reporting,/opt/odoo/custom-addons/stock-logistics-warehouse,/opt/odoo/custom-addons/stock-logistics-workflow,/opt/odoo/custom-addons/timesheet data_dir = /opt/odoo/odoo log_level = info ; admin_passwd = From ba7ad02b723d183792528d7e25e95191c545f86a Mon Sep 17 00:00:00 2001 From: Adrian Resua Vidal Date: Thu, 15 Jun 2023 10:37:34 +0200 Subject: [PATCH 4/8] [FIX] Updated wkhtmltopdf --- odoo-15/odoo-prod/Dockerfile | 11 ++++++----- odoo-15/odoo-test/Dockerfile | 11 ++++++----- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/odoo-15/odoo-prod/Dockerfile b/odoo-15/odoo-prod/Dockerfile index e305434..e3f543a 100644 --- a/odoo-15/odoo-prod/Dockerfile +++ b/odoo-15/odoo-prod/Dockerfile @@ -63,11 +63,12 @@ RUN set -x; \ libxrender1 \ xfonts-75dpi \ xfonts-base \ - && curl -o wkhtmltox.deb -SL https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox_0.12.5-1.bionic_amd64.deb \ - && echo 'f1689a1b302ff102160f2693129f789410a1708a wkhtmltox.deb' | sha1sum -c - \ - && dpkg --force-depends -i wkhtmltox.deb\ - && apt-get -y install -f --no-install-recommends \ - && rm -rf /var/lib/apt/lists/* wkhtmltox. \ + && wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.0g-2ubuntu4_amd64.deb \ + && dpkg -i libssl1.1_1.1.0g-2ubuntu4_amd64.deb \ + && curl -o wkhtmltox.deb -sSL https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox_0.12.5-1.focal_amd64.deb \ + && echo 'ae4e85641f004a2097621787bf4381e962fb91e1 wkhtmltox.deb' | sha1sum -c - \ + && apt install -y --no-install-recommends ./wkhtmltox.deb \ + && rm -rf /var/lib/apt/lists/* wkhtmltox.deb \ && apt install libssl-dev build-essential zlib1g-dev \ && curl -o Python-3.8.10.tgz -SL https://www.python.org/ftp/python/3.8.10/Python-3.8.10.tgz \ && tar xzf Python-3.8.10.tgz \ diff --git a/odoo-15/odoo-test/Dockerfile b/odoo-15/odoo-test/Dockerfile index 5d5adda..0a44995 100644 --- a/odoo-15/odoo-test/Dockerfile +++ b/odoo-15/odoo-test/Dockerfile @@ -63,11 +63,12 @@ RUN set -x; \ libxrender1 \ xfonts-75dpi \ xfonts-base \ - && curl -o wkhtmltox.deb -SL https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox_0.12.5-1.bionic_amd64.deb \ - && echo 'f1689a1b302ff102160f2693129f789410a1708a wkhtmltox.deb' | sha1sum -c - \ - && dpkg --force-depends -i wkhtmltox.deb\ - && apt-get -y install -f --no-install-recommends \ - && rm -rf /var/lib/apt/lists/* wkhtmltox. \ + && wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.0g-2ubuntu4_amd64.deb \ + && dpkg -i libssl1.1_1.1.0g-2ubuntu4_amd64.deb \ + && curl -o wkhtmltox.deb -sSL https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox_0.12.5-1.focal_amd64.deb \ + && echo 'ae4e85641f004a2097621787bf4381e962fb91e1 wkhtmltox.deb' | sha1sum -c - \ + && apt install -y --no-install-recommends ./wkhtmltox.deb \ + && rm -rf /var/lib/apt/lists/* wkhtmltox.deb \ && apt install libssl-dev build-essential zlib1g-dev \ && curl -o Python-3.8.10.tgz -SL https://www.python.org/ftp/python/3.8.10/Python-3.8.10.tgz \ && tar xzf Python-3.8.10.tgz \ From f29f9a59e3fc11209bf00b9242139e86ba90d9dc Mon Sep 17 00:00:00 2001 From: Adrian Resua Vidal Date: Thu, 27 Jul 2023 09:33:08 +0200 Subject: [PATCH 5/8] [FIX] Update python requirements --- odoo-15/odoo-prod/Dockerfile | 4 ++-- odoo-15/odoo-test/Dockerfile | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/odoo-15/odoo-prod/Dockerfile b/odoo-15/odoo-prod/Dockerfile index e3f543a..81d903e 100644 --- a/odoo-15/odoo-prod/Dockerfile +++ b/odoo-15/odoo-prod/Dockerfile @@ -106,8 +106,8 @@ RUN /bin/bash -c "mkdir -p /opt/odoo/custom-addons" # Create Virtual Enviroment RUN /bin/bash -c "cd /opt/odoo && virtualenv -p python3.8 venv" -# Python dependencies -RUN /bin/bash -c "cd /opt/odoo && source venv/bin/activate && pip install -U setuptools && pip3 install -r /opt/odoo/odoo/requirements.txt && deactivate" +# Python dependencies, specific library versions to fix dependences error +RUN /bin/bash -c "cd /opt/odoo && source venv/bin/activate && pip install -U setuptools && pip3 install -r /opt/odoo/odoo/requirements.txt && pip3 install -U cryptography==38.0.2 && pip3 install -U pyopenssl==23.2.0 && deactivate" # Clone interesting OCA repositories RUN /bin/bash -c "cd /opt/odoo/custom-addons && git clone https://github.com/OCA/account-analytic -b 15.0 --single-branch --depth 1 account-analytic" diff --git a/odoo-15/odoo-test/Dockerfile b/odoo-15/odoo-test/Dockerfile index 0a44995..a753592 100644 --- a/odoo-15/odoo-test/Dockerfile +++ b/odoo-15/odoo-test/Dockerfile @@ -106,8 +106,8 @@ RUN /bin/bash -c "mkdir -p /opt/odoo/custom-addons" # Create Virtual Enviroment RUN /bin/bash -c "cd /opt/odoo && virtualenv -p python3.8 venv" -# Python dependencies -RUN /bin/bash -c "cd /opt/odoo && source venv/bin/activate && pip install -U setuptools && pip3 install -r /opt/odoo/odoo/requirements.txt && deactivate" +# Python dependencies, specific library versions to fix dependences error +RUN /bin/bash -c "cd /opt/odoo && source venv/bin/activate && pip install -U setuptools && pip3 install -r /opt/odoo/odoo/requirements.txt && pip3 install -U cryptography==38.0.2 && pip3 install -U pyopenssl==23.2.0 && deactivate" # Clone interesting OCA repositories RUN /bin/bash -c "cd /opt/odoo/custom-addons && git clone https://github.com/OCA/account-analytic -b 15.0 --single-branch --depth 1 account-analytic" From a6442063ebc13044004204581417a719e43b94ac Mon Sep 17 00:00:00 2001 From: Adrian Resua Vidal Date: Tue, 9 Jan 2024 12:14:34 +0100 Subject: [PATCH 6/8] [FIX]: Add multi OS support --- .gitattributes | 1 + 1 file changed, 1 insertion(+) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..526c8a3 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +*.sh text eol=lf \ No newline at end of file From aedf17605497e9f10a721549a2a7c3d356867bcd Mon Sep 17 00:00:00 2001 From: Adrian Resua Vidal Date: Wed, 8 May 2024 16:48:25 +0200 Subject: [PATCH 7/8] [FIX]: Fix pip dependencies --- odoo-15/odoo-prod/Dockerfile | 4 +++- odoo-15/odoo-test/Dockerfile | 5 +++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/odoo-15/odoo-prod/Dockerfile b/odoo-15/odoo-prod/Dockerfile index 81d903e..b47b24c 100644 --- a/odoo-15/odoo-prod/Dockerfile +++ b/odoo-15/odoo-prod/Dockerfile @@ -107,7 +107,7 @@ RUN /bin/bash -c "mkdir -p /opt/odoo/custom-addons" RUN /bin/bash -c "cd /opt/odoo && virtualenv -p python3.8 venv" # Python dependencies, specific library versions to fix dependences error -RUN /bin/bash -c "cd /opt/odoo && source venv/bin/activate && pip install -U setuptools && pip3 install -r /opt/odoo/odoo/requirements.txt && pip3 install -U cryptography==38.0.2 && pip3 install -U pyopenssl==23.2.0 && deactivate" +RUN /bin/bash -c "cd /opt/odoo && source venv/bin/activate && pip install -U setuptools && pip3 install -r /opt/odoo/odoo/requirements.txt && deactivate" # Clone interesting OCA repositories RUN /bin/bash -c "cd /opt/odoo/custom-addons && git clone https://github.com/OCA/account-analytic -b 15.0 --single-branch --depth 1 account-analytic" @@ -158,6 +158,8 @@ RUN /bin/bash -c "cd /opt/odoo && source venv/bin/activate && pip install -r /op # RUN /bin/bash -c "cd /opt/odoo && source venv/bin/activate && pip install -r /opt/odoo/custom-addons/web/requirements.txt && deactivate" # RUN /bin/bash -c "cd /opt/odoo && source venv/bin/activate && pip install -r /opt/odoo/custom-addons/server-tools/requirements.txt && deactivate" +RUN /bin/bash -c "cd /opt/odoo && source venv/bin/activate && pip3 install -U cryptography==38.0.2 && pip3 install -U pyopenssl==23.2.0 && pip3 install -U requests-pkcs12==1.16 && deactivate" + VOLUME ["/opt/odoo"] # Expose Odoo services diff --git a/odoo-15/odoo-test/Dockerfile b/odoo-15/odoo-test/Dockerfile index a753592..b47b24c 100644 --- a/odoo-15/odoo-test/Dockerfile +++ b/odoo-15/odoo-test/Dockerfile @@ -107,7 +107,7 @@ RUN /bin/bash -c "mkdir -p /opt/odoo/custom-addons" RUN /bin/bash -c "cd /opt/odoo && virtualenv -p python3.8 venv" # Python dependencies, specific library versions to fix dependences error -RUN /bin/bash -c "cd /opt/odoo && source venv/bin/activate && pip install -U setuptools && pip3 install -r /opt/odoo/odoo/requirements.txt && pip3 install -U cryptography==38.0.2 && pip3 install -U pyopenssl==23.2.0 && deactivate" +RUN /bin/bash -c "cd /opt/odoo && source venv/bin/activate && pip install -U setuptools && pip3 install -r /opt/odoo/odoo/requirements.txt && deactivate" # Clone interesting OCA repositories RUN /bin/bash -c "cd /opt/odoo/custom-addons && git clone https://github.com/OCA/account-analytic -b 15.0 --single-branch --depth 1 account-analytic" @@ -143,7 +143,6 @@ RUN /bin/bash -c "cd /opt/odoo/custom-addons && git clone https://github.com/OCA RUN /bin/bash -c "cd /opt/odoo/custom-addons && git clone https://github.com/OCA/timesheet -b 15.0 --single-branch --depth 1 timesheet" RUN /bin/bash -c "cd /opt/odoo/custom-addons && git clone https://github.com/OCA/web -b 15.0 --single-branch --depth 1 web" - #OCA Dependencies RUN /bin/bash -c "cd /opt/odoo && source venv/bin/activate && pip install -r /opt/odoo/custom-addons/account-financial-tools/requirements.txt && deactivate" # RUN /bin/bash -c "cd /opt/odoo && source venv/bin/activate && pip install -r /opt/odoo/custom-addons/bank-payment/requirements.txt && deactivate" @@ -159,6 +158,8 @@ RUN /bin/bash -c "cd /opt/odoo && source venv/bin/activate && pip install -r /op # RUN /bin/bash -c "cd /opt/odoo && source venv/bin/activate && pip install -r /opt/odoo/custom-addons/web/requirements.txt && deactivate" # RUN /bin/bash -c "cd /opt/odoo && source venv/bin/activate && pip install -r /opt/odoo/custom-addons/server-tools/requirements.txt && deactivate" +RUN /bin/bash -c "cd /opt/odoo && source venv/bin/activate && pip3 install -U cryptography==38.0.2 && pip3 install -U pyopenssl==23.2.0 && pip3 install -U requests-pkcs12==1.16 && deactivate" + VOLUME ["/opt/odoo"] # Expose Odoo services From ba0baff35bb7f6ede0e9b0d3c10e0411710371f3 Mon Sep 17 00:00:00 2001 From: Adrian Resua Vidal Date: Wed, 26 Jun 2024 08:51:35 +0200 Subject: [PATCH 8/8] [IMP] odoo-15: Change odoo.conf to match nginx conf --- odoo-15/odoo-prod/odoo.conf | 4 ++-- odoo-15/odoo-test/odoo.conf | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/odoo-15/odoo-prod/odoo.conf b/odoo-15/odoo-prod/odoo.conf index cd701a4..9f645a5 100644 --- a/odoo-15/odoo-prod/odoo.conf +++ b/odoo-15/odoo-prod/odoo.conf @@ -17,7 +17,7 @@ db_password = odoo ; email_from = False ; geoip_database = /usr/share/GeoIP/GeoLite2-City.mmdb ; http_enable = True -; http_interface = +http_interface = 0.0.0.0 ; http_port = 8069 ; import_partial = limit_memory_hard = 4294967296 @@ -39,7 +39,7 @@ logfile = /opt/odoo/logs/odoo.log ; osv_memory_count_limit = False ; pg_path = None ; pidfile = False -; proxy_mode = False +proxy_mode = True ; reportgz = False ; server_wide_modules = web ; smtp_password = False diff --git a/odoo-15/odoo-test/odoo.conf b/odoo-15/odoo-test/odoo.conf index aab55b0..3438575 100644 --- a/odoo-15/odoo-test/odoo.conf +++ b/odoo-15/odoo-test/odoo.conf @@ -17,7 +17,7 @@ db_password = odoo ; email_from = False ; geoip_database = /usr/share/GeoIP/GeoLite2-City.mmdb ; http_enable = True -; http_interface = +http_interface = 0.0.0.0 ; http_port = 8069 ; import_partial = limit_memory_hard = 4294967296 @@ -39,7 +39,7 @@ logfile = /opt/odoo/logs/odoo.log ; osv_memory_count_limit = False ; pg_path = None ; pidfile = False -; proxy_mode = False +proxy_mode = True ; reportgz = False ; server_wide_modules = web ; smtp_password = False