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 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 diff --git a/odoo-15/odoo-prod/Dockerfile b/odoo-15/odoo-prod/Dockerfile index e928516..b47b24c 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 \ @@ -80,8 +81,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 \ @@ -105,7 +106,7 @@ 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 +# 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 && deactivate" # Clone interesting OCA repositories @@ -113,6 +114,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 +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" @@ -155,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-prod/odoo.conf b/odoo-15/odoo-prod/odoo.conf index 369d9c2..9f645a5 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 = @@ -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/Dockerfile b/odoo-15/odoo-test/Dockerfile index 044327a..b47b24c 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 \ @@ -80,8 +81,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,11 +103,18 @@ 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, 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 && 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" 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" @@ -135,12 +143,10 @@ 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" # 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" @@ -152,8 +158,7 @@ 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" +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"] diff --git a/odoo-15/odoo-test/odoo.conf b/odoo-15/odoo-test/odoo.conf index 6c1bd0d..3438575 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 = @@ -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