diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 02e31173..4b527cba 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -29,7 +29,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - odoo_serie: ["12.0", "13.0", "14.0", "15.0", "16.0", "17.0"] + odoo_serie: ["12.0", "13.0", "14.0", "15.0", "16.0", "17.0", "18,0"] steps: - uses: actions/checkout@v4 diff --git a/18.0/Dockerfile b/18.0/Dockerfile new file mode 100644 index 00000000..8fda6780 --- /dev/null +++ b/18.0/Dockerfile @@ -0,0 +1,81 @@ +FROM python:3.12-slim-bookworm +ARG UID=999 +# create the working directory and a place to set the logs (if wanted) +RUN mkdir -p /odoo /var/log/odoo + +COPY ./base_requirements.txt /odoo +COPY ./install /install + +# Moved because there was a bug while installing `odoo-autodiscover`. There is +# an accent in the contributor name +ENV LANG=C.UTF-8 \ + LC_ALL=C.UTF-8 + +# build and dev packages +ENV BUILD_PACKAGE \ + build-essential \ + gcc \ + libevent-dev \ + libfreetype6-dev \ + libxml2-dev \ + libxslt1-dev \ + libsasl2-dev \ + libldap2-dev \ + libssl-dev \ + libjpeg-dev \ + libpng-dev \ + zlib1g-dev \ + git + +# Install some deps, lessc and less-plugin-clean-css, and wkhtmltopdf +# wkhtml-buster is kept as in official image, no deb available for bullseye +RUN set -x; \ + sh -c /install/package_odoo.sh \ + && /install/setup-pip.sh \ + && /install/postgres.sh \ + && /install/kwkhtml_client.sh \ + && /install/kwkhtml_client_force_python3.sh \ + && /install/dev_package.sh \ + && pip install -r /odoo/base_requirements.txt --ignore-installed \ + && /install/purge_dev_package_and_cache.sh + +# grab dockerize to generate template and +# wait on postgres +RUN /install/dockerize.sh + +COPY ./src_requirements.txt /odoo +COPY ./bin /odoo/odoo-bin +COPY ./templates /templates +COPY ./before-migrate-entrypoint.d /odoo/before-migrate-entrypoint.d +COPY ./start-entrypoint.d /odoo/start-entrypoint.d +COPY ./MANIFEST.in /odoo +RUN adduser --disabled-password -u $UID --gecos '' odoo \ + && touch /odoo/odoo.cfg \ + && mkdir -p /odoo/data/odoo/{addons,filestore,sessions} \ + && chown -R odoo:odoo /odoo && usermod odoo --home /odoo \ + && chown -R odoo:odoo /var/log/odoo + +VOLUME ["/data/odoo", "/var/log/odoo"] +USER odoo +# Expose Odoo services +EXPOSE 8069 8072 + +ENV ODOO_VERSION=18.0 \ + PATH=/odoo/odoo-bin:/odoo/.local/bin:$PATH \ + LANG=C.UTF-8 \ + LC_ALL=C.UTF-8 \ + DB_HOST=db \ + DB_PORT=5432 \ + DB_NAME=odoodb \ + DB_USER=odoo \ + DB_PASSWORD=odoo \ + ODOO_BASE_URL=http://localhost:8069 \ + ODOO_REPORT_URL=http://localhost:8069 \ + # the place where you put the data of your project (csv, ...) + ODOO_DATA_PATH=/odoo/data \ + DEMO=False \ + ADDONS_PATH=/odoo/odoo/addons,/odoo/odoo/src/odoo/addons \ + OPENERP_SERVER=/odoo/odoo.cfg + +ENTRYPOINT ["docker-entrypoint.sh"] +CMD ["odoo"] diff --git a/18.0/MANIFEST.in b/18.0/MANIFEST.in new file mode 100644 index 00000000..5dff9997 --- /dev/null +++ b/18.0/MANIFEST.in @@ -0,0 +1 @@ +recursive-include odoo/data * diff --git a/18.0/base_requirements.txt b/18.0/base_requirements.txt new file mode 100644 index 00000000..91d44e16 --- /dev/null +++ b/18.0/base_requirements.txt @@ -0,0 +1,95 @@ +# The officially supported versions of the following packages are their +# python3-* equivalent distributed in Ubuntu 24.04 and Debian 12 +asn1crypto==1.5.1 ; python_version >= '3.11' +Babel==2.10.3 ; python_version >= '3.11' +cbor2==5.6.2 ; python_version >= '3.12' +chardet==5.2.0 ; python_version >= '3.11' +cryptography==42.0.8 ; python_version >= '3.12' # (Noble) min 41.0.7, pinning 42.0.8 for security fixes +decorator==5.1.1 ; python_version >= '3.11' +docutils==0.20.1 ; python_version >= '3.11' +freezegun==1.2.1 ; python_version >= '3.11' +geoip2==2.9.0 +gevent==24.2.1 ; sys_platform != 'win32' and python_version >= '3.12' # (Noble) +greenlet==3.0.3 ; sys_platform != 'win32' and python_version >= '3.12' # (Noble) +idna==3.7 ; python_version >= '3.12' +Jinja2==3.1.3 ; python_version > '3.10' +libsass==0.22.0 ; python_version >= '3.11' # (Noble) Mostly to have a wheel package +lxml==5.2.1; python_version >= '3.12' # (Noble - removed html clean) +lxml-html-clean; python_version >= '3.12' # (Noble - removed from lxml, unpinned for futur security patches) +MarkupSafe==2.1.5 ; python_version >= '3.12' # (Noble) Mostly to have a wheel package +num2words==0.5.13 ; python_version >= '3.12' +ofxparse==0.21 +openpyxl==3.1.2 ; python_version >= '3.12' +passlib==1.7.4 # min version = 1.7.2 (Focal with security backports) +Pillow==10.3.0 ; python_version >= '3.12' # (Noble) Mostly to have a wheel package +polib==1.1.1 +psutil==5.9.4 ; python_version > '3.10' and python_version < '3.12' +psutil==5.9.8 ; python_version >= '3.12' # (Noble) Mostly to have a wheel package +psycopg2==2.9.9 ; python_version >= '3.12' # (Noble) Mostly to have a wheel package +pyopenssl==24.1.0 ; python_version >= '3.12' # (Noble) min 23.2.0, pinned for compatibility with cryptography==42.0.8 and security patches +PyPDF2==2.12.1 ; python_version > '3.10' +pyserial==3.5 +python-dateutil==2.8.2 ; python_version >= '3.11' +python-ldap==3.4.4 ; sys_platform != 'win32' and python_version >= '3.12' # (Noble) Mostly to have a wheel package +python-stdnum==1.19 ; python_version >= '3.11' +pytz # no version pinning to avoid OS perturbations +pyusb==1.2.1 +qrcode==7.4.2 ; python_version >= '3.11' +reportlab==4.1.0 ; python_version >= '3.12' # (Noble) Mostly to have a wheel package +requests==2.32.0 ; python_version >= '3.11' # (Noble) +rjsmin==1.2.0 ; python_version >= '3.11' +urllib3==2.0.7 ; python_version >= '3.12' # (Noble) Compatibility with cryptography +vobject==0.9.6.1 +Werkzeug==3.0.3 ; python_version >= '3.12' # (Noble) Avoid deprecation warnings +xlrd==2.0.1 ; python_version >= '3.12' +XlsxWriter==3.1.9 ; python_version >= '3.12' +xlwt==1.3.0 +zeep==4.2.1 ; python_version >= '3.11' + + + + + + +setuptools==73.0.1 + +# Not part of official requirements, but used by some addons +# colorama==0.3.9 +gdata==2.0.18 +html5lib==1.1 +odfpy==1.4.1 +pyinotify==0.9.6 +simplejson==3.19.3 + + +# Migration tools +marabunta==0.12.0 +-e git+https://github.com/camptocamp/anthem@master#egg=anthem + +# test / lint +# those libs and their dependencies are unpinned +# to always test with the last version of it +flake8 +pytest==8.3.2 +pluggy +coverage +pytest-odoo>=0.4.7 +pytest-cov>=2.10.0 +watchdog + +# Library dependency +argh==0.31.3 +atomicwrites==1.4.1 +attrs==24.2.0 +beautifulsoup4==4.12.3 +future==1.0.0 +mccabe==0.7.0 +more-itertools==10.4.0 +pbr==6.0.0 +pexpect==4.9.0 +ptyprocess==0.7.0 +py==1.11.0 +pycodestyle==2.12.1 +pyflakes==3.2.0 +unicodecsv==0.14.1 +wrapt==1.16.0 diff --git a/18.0/extra_requirements.txt b/18.0/extra_requirements.txt new file mode 100644 index 00000000..619600eb --- /dev/null +++ b/18.0/extra_requirements.txt @@ -0,0 +1,45 @@ +# Extra python dependencies +algoliasearch==4.1.1 +Adyen==12.3.0 +cachetools==5.5.0 +cerberus==1.3.5 +boto3==1.35.6 +factur-x==3.1 +invoice2data==0.4.5 +mailjet-rest==1.3.4 +openupgradelib==3.6.1 +paramiko==3.4.1 +parse-accept-language==0.1.2 +paypalrestsdk==1.13.3 +phonenumbers==8.13.44 +pyquerystring==1.1 +pyOpenSSL==24.2.1 +pyquerystring==1.1 +pysimplesoap==1.16.2 +requests-mock==1.12.1 +slugify==0.0.1 +stripe==10.8.0 +unidecode==1.3.8 +vcrpy==6.0.1 + +# Library dependency +asn1crypto==1.5.1 +bcrypt==4.2.0 +botocore==1.35.6 +cffi==1.17.0 +cryptography==43.0.0 +dateparser==1.2.0 +idna==3.8 +jmespath==1.0.1 +multidict==6.0.5 +pdfminer.six==20240706 +pyasn1==0.6.0 +pycparser==2.22 +pycryptodome==3.20.0 +PyNaCl==1.5.0 +pytesseract==0.3.13 +regex==2024.7.24 +s3transfer==0.10.2 +tzlocal==5.2 +Unidecode==1.3.8 +yarl==1.9.4 diff --git a/18.0/src_requirements.txt b/18.0/src_requirements.txt new file mode 100644 index 00000000..69b456a7 --- /dev/null +++ b/18.0/src_requirements.txt @@ -0,0 +1,8 @@ +# Requirements for the project itself and for Odoo. +# When we install Odoo with -e, odoo.py is available in the PATH and +# 'openerp' in the PYTHONPATH +# +# They are installed only after all the project's files have been copied +# into the image (with ONBUILD) +-e . +-e src diff --git a/18.0/templates/odoo.cfg.tmpl b/18.0/templates/odoo.cfg.tmpl new file mode 100644 index 00000000..17989b6d --- /dev/null +++ b/18.0/templates/odoo.cfg.tmpl @@ -0,0 +1,51 @@ +[options] +addons_path = {{ .Env.ADDONS_PATH }} +data_dir = /odoo/data/odoo +auto_reload = False +db_host = {{ .Env.DB_HOST }} +db_name = {{ .Env.DB_NAME }} +db_user = {{ .Env.DB_USER }} +db_password = {{ .Env.DB_PASSWORD }} +db_sslmode = {{ default .Env.DB_SSLMODE "prefer" }} +dbfilter = ^{{ default .Env.DB_FILTER .Env.DB_NAME }}$ +list_db = {{ default .Env.LIST_DB "False" }} +admin_passwd = {{ default .Env.ADMIN_PASSWD "" }} +db_maxconn = {{ default .Env.DB_MAXCONN "64" }} +limit_memory_soft = {{ default .Env.LIMIT_MEMORY_SOFT "2147483648" }} +limit_memory_hard = {{ default .Env.LIMIT_MEMORY_HARD "2684354560" }} +limit_request = {{ default .Env.LIMIT_REQUEST "8192" }} +limit_time_cpu = {{ default .Env.LIMIT_TIME_CPU "60" }} +limit_time_real = {{ default .Env.LIMIT_TIME_REAL "120" }} +limit_time_real_cron = {{ default .Env.LIMIT_TIME_REAL_CRON "120" }} +log_handler = {{ default .Env.LOG_HANDLER "':INFO'" }} +log_level = {{ default .Env.LOG_LEVEL "info" }} +max_cron_threads = {{ default .Env.MAX_CRON_THREADS "2" }} +workers = {{ default .Env.WORKERS "4" }} +logfile = {{ default .Env.LOGFILE "None" }} +log_db = {{ default .Env.LOG_DB "False" }} +logrotate = True +syslog = {{ default .Env.SYSLOG "False" }} +running_env = {{ default .Env.RUNNING_ENV "dev" }} +without_demo = {{ default .Env.WITHOUT_DEMO "True" }} +server_wide_modules = {{ default .Env.SERVER_WIDE_MODULES "" }} +; db_sslmode = +; We can activate proxy_mode even if we are not behind a proxy, because +; it is used only if HTTP_X_FORWARDED_HOST is set in environ +proxy_mode = True +; csv_internal_sep = , +; db_template = template1 +; debug_mode = False +; email_from = False +; http_port = 8069 +; http_enable = True +; http_interface = +; longpolling_port = 8072 +; osv_memory_age_limit = 1.0 +; osv_memory_count_limit = False +; smtp_password = False +; smtp_port = 25 +; smtp_server = localhost +; smtp_ssl = False +; smtp_user = False +unaccent = {{ default .Env.UNACCENT "False" }} +{{ default .Env.ADDITIONAL_ODOO_RC "" }}