diff --git a/compose.yml.template b/compose.yml.template index a920cfa2..0f6df8ce 100644 --- a/compose.yml.template +++ b/compose.yml.template @@ -55,6 +55,7 @@ services: PYTHON_INSTALL: ${PYTHON_INSTALL} SERVER_WIDE_MODULES: ${SERVER_WIDE_MODULES} SESSION_DB_URI: ${SESSION_DB_URI} + HTTP_INTERFACE: ${HTTP_INTERFACE} PROXY_MODE: ${PROXY_MODE} LOG_LEVEL: ${LOG_LEVEL} LIST_DB: ${LIST_DB} @@ -77,7 +78,7 @@ services: TEST_EXCLUDE: ${TEST_EXCLUDE} AUTO_UPDATE_TRANSLATIONS: "${AUTO_UPDATE_TRANSLATIONS}" AUTO_UPDATE_MODULES_LIST: "${AUTO_UPDATE_MODULES_LIST}" - command: ${ODOO_COMMAND} --http-interface=0.0.0.0 + command: ${ODOO_COMMAND} ports: - "${ODOO_PORT}:8069" - "${NGINX_PORT}:8080" diff --git a/images/odoo/README.md b/images/odoo/README.md index 22e1b43d..ed2abab5 100644 --- a/images/odoo/README.md +++ b/images/odoo/README.md @@ -150,6 +150,7 @@ services: pyjwt SERVER_WIDE_MODULES: session_db,module_change_auto_install SESSION_DB_URI: postgres://odoo:odoo@db/18.0 + HTTP_INTERFACE: 0.0.0.0 PROXY_MODE: False LOG_LEVEL: debug MAX_CRON_THREADS: 4 @@ -476,6 +477,7 @@ The Odoo server can be configured using these env vars: - `PYTHON_INSTALL` Comma or line-break seperated list of python packages. - `SERVER_WIDE_MODULES` Comma separated list of modules to load with server. The variable will be prefixed with `base,web`. - `SESSION_DB_URI` Connection string for storing session data in database. +- `HTTP_INTERFACE` IP address the Odoo HTTP server listens on. Default is `0.0.0.0`. - `PROXY_MODE` Enable server proxy mode. Default is `True`. - `LOG_LEVEL` Set the logging level. Default is `info`. - `LOG_DB` When enabled the database log is shown in the Odoo log. Default is `False`. diff --git a/images/odoo/entrypoint.sh b/images/odoo/entrypoint.sh index b457af7d..eb99865f 100755 --- a/images/odoo/entrypoint.sh +++ b/images/odoo/entrypoint.sh @@ -25,6 +25,7 @@ PGPORT=${PGPORT:=5432} PGUSER=${PGUSER:='odoo'} PGPASSWORD=${PGPASSWORD:='odoo'} PGSSLMODE=${PGSSLMODE:="prefer"} +HTTP_INTERFACE=${HTTP_INTERFACE:='0.0.0.0'} export PGSSLROOTCERT if [[ "$PGSSLMODE" = "verify-ca" ]] && [[ ! -f "$PGSSLROOTCERT" ]]; then @@ -76,17 +77,17 @@ case "$1" in if [[ "$1" == "scaffold" ]] ; then exec odoo "$@" else - exec odoo "${DB_ARGS[@]}" "$@" + exec odoo --http-interface="${HTTP_INTERFACE}" "${DB_ARGS[@]}" "$@" fi ;; -- | odoo-nginx) shift log-entrypoint 'Start Odoo with nginx.' nginx -c /etc/nginx/nginx.conf & - exec odoo "${DB_ARGS[@]}" "$@" + exec odoo --http-interface="${HTTP_INTERFACE}" "${DB_ARGS[@]}" "$@" ;; -*) - exec odoo "${DB_ARGS[@]}" "$@" + exec odoo --http-interface="${HTTP_INTERFACE}" "${DB_ARGS[@]}" "$@" ;; *) exec "$@" diff --git a/prompt.md b/prompt.md index ecfe3931..d87771c3 100644 --- a/prompt.md +++ b/prompt.md @@ -1,12 +1,12 @@ --- title: "Odoo 20.0 https interface param" author: "Janik von Rotz " -state: draft -date_completed: YYYY-MM-DD -harness: -model: -input_tokens: -output_tokens: +state: completed +date_completed: 2026-10-13 +harness: pi +model: moonshotai/Kimi-K2.6 +input_tokens: 24524 +output_tokens: 4075 --- # Odoo 20.0 https interface param @@ -39,6 +39,7 @@ I will build and test the image. ## Worklog -@Clanker Add a summary here once the task has been completed. - -@Clanker Set frontmatter state to completed and update date, harness and model. If you have access to session info also add token count. +- Verified that `--http-interface` is a command-line only option in Odoo (not supported in `odoo.conf`). +- Added `HTTP_INTERFACE=${HTTP_INTERFACE:='0.0.0.0'}` to `images/odoo/entrypoint.sh` and passed it as `--http-interface="${HTTP_INTERFACE}"` to all `exec odoo` invocations (except scaffold). +- Documented `HTTP_INTERFACE` in `images/odoo/README.md` in both the compose example and the Server Environment section, placed before `PROXY_MODE`. +- Removed `--http-interface=0.0.0.0` from `compose.yml.template` and added `HTTP_INTERFACE: ${HTTP_INTERFACE}` to the environment section before `PROXY_MODE`.