Skip to main content

mangono-addon-odoo_custom_server

PyPI Python License: AGPL-3

odoo-bin commands to run Odoo in a cloud environment: web server behind an integrated reverse proxy, automatic module update on deployment, database neutralization, assets regeneration, interactive shell. The configuration comes from the environment variables, through environ-odoo-config, without an odoo.conf file.

The package ships the Odoo module odoo_custom_server. It is not installed on a database: it only provides the commands and the patches of the Odoo core they apply at startup. Odoo itself is not modified.

Installation

pip install mangono-addon-odoo_custom_server

Install it in the Python environment of Odoo. The commands are then available as odoo-bin <command>.

Supported versions: Odoo 14 to 20, tested in CI on each of them.

Commands

Command Role
cloud_server Odoo web server behind a Caddy reverse proxy started and stopped with Odoo: static files, X-Sendfile, database manager blocking.
cloud_auto_update Installs and updates the modules, then stops. Detects the installed modules that changed (manifest version or content hash).
generate_assets Removes the asset bundles of a database (rebuilt by Odoo at the next request) and computes the missing menu icons.
db_neutralize Neutralizes a database like odoo-bin neutralize, then runs the dump-cleaner.sql of each addons path.
cloud_shell Interactive shell with the options of the Odoo 20 odoo-bin shell (--shell-interface, --shell-file), on Odoo 14 to 20.
front_proxy Starts or stops the Caddy reverse proxy apart from the Odoo process (start / stop).

Deprecated, removed in 2.0.0: generic_server, web_server (replaced by cloud_server), update_server (replaced by cloud_auto_update).

Usage

# Web server on $HTTP_PORT, Odoo listens on 127.0.0.1:8069 behind Caddy
DB_NAME=my_db odoo-bin cloud_server

# Install $INSTALL, update $UPDATE and the modules changed since the last update, then stop
DB_NAME=my_db odoo-bin cloud_auto_update

# Other commands
DB_NAME=my_db odoo-bin generate_assets
DB_NAME=my_db odoo-bin db_neutralize
DB_NAME=my_db odoo-bin cloud_shell --shell-interface ipython

cloud_auto_update takes a PostgreSQL advisory lock per database: several instances started together do not update the same database in parallel.

Odoo core patches

Applied at startup by the commands of this package, through runtime wrappers (wrapt):

  • Database allow-list: Odoo connects only to the databases of $DB_NAME. A connection to postgres is redirected to the first configured database, any other database is refused.
  • PostgreSQL application_name: odoo-<pid> by default, or PGAPPNAME / db_app_name ({pid} is replaced).
  • Reverse proxy: X-Forwarded-Host is set from Host when the proxy sends only X-Forwarded-Proto (case of Clever Cloud), so that Odoo stays in proxy mode.
  • Garbage collector: the thresholds of Odoo 19 on Odoo 14 to 18 (GC_THRESHOLD to override), gc.freeze() before each worker fork in prefork mode (GC_FREEZE=False to disable).
  • HTTP Server header: Odoo instead of the Werkzeug and Python versions.

Security

  • The database allow-list applies only when $DB_NAME is set. Without it, Odoo connects to any database, as usual.
  • With cloud_server, Odoo listens on 127.0.0.1 only; only the proxy is exposed.
  • With cloud_server, the /web/database/* routes are redirected to /web/login by the proxy when list_db is off (LIST_DB). When it is on, the database manager is reachable, protected by the Odoo master password only.
  • The other commands (odoo-bin without proxy) do not block the database manager.

License

AGPL-3, Mangono.

Metadata

Release files for mangono-addon-odoo-custom-server 1.8.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mangono-addon-odoo-custom-server 1.8.3
File Size Uploaded Provenance Actions
mangono_addon_odoo_custom_server-1.8.3.tar.gz 114.3 kB Without provenance Details for mangono_addon_odoo_custom_server-1.8.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for mangono-addon-odoo-custom-server 1.8.3
File Interpreter ABI Platform Actions
mangono_addon_odoo_custom_server-1.8.3-py3-none-any.whl Python 3 none any Details for mangono_addon_odoo_custom_server-1.8.3-py3-none-any.whl

Total release size: 164.3 kB

Release files / mangono_addon_odoo_custom_server-1.8.3.tar.gz

Download URL mangono_addon_odoo_custom_server-1.8.3.tar.gz
Size 114.3 kB
Tags Source
SHA-256 checksum
How to use checksums
a5a431cd907a12d63f2129f0eb2b8eb34aee5a3bac5787669801836351007685
BLAKE2b-256 checksum
How to use checksums
9527794cfb5c54ed65492401156ddd9f4377c6a0ddbd3b87d89e9e373bdc83f4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.15.2

Release files / mangono_addon_odoo_custom_server-1.8.3-py3-none-any.whl

Download URL mangono_addon_odoo_custom_server-1.8.3-py3-none-any.whl
Size 50.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
637021dfd8c48883fe375a432af9617a61004e4fa48824169b9c301a814a65ad
BLAKE2b-256 checksum
How to use checksums
b9c1d0afaa2ae8b004dc42eb51ae04072d42041757c13e8ca4dd19e3a13e001b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.15.2

Security for mangono-addon-odoo-custom-server 1.8.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page