Files
stateless-container-for-one…/README.md
T
1b-agent b2e1d1d3d5 [FIX] odoo20: bind http_interface 0.0.0.0 + http_port rename
Symptom: fresh Odoo 20 deploy serves 127.0.0.1:8069 only; Traefik and the
swarm VIP get connection refused -> HTTP 502 through the preview domain.

Root cause (odoo/tools/config.py):
  - line 289: --http-interface my_default='127.0.0.1'
  - lines 768-770: empty http_interface is force-reset to 127.0.0.1
  - the legacy xmlrpc_port key no longer exists (renamed http_port), so
    the old conf line was silently ignored (port worked only via default)

Fix: generated odoo.conf now sets http_interface = 0.0.0.0 and
http_port = 8069. Verified end-to-end on the onebspace deployment:
internal 8069 binds 0.0.0.0, preview domain returns 200.
2026-11-10 14:30:57 +00:00

48 lines
2.4 KiB
Markdown

# stateless-container-for-one-os-dev
Stateless **hot-reload Odoo 20 codespace** for [`1b-agent/one-os-dev`](../one-os-dev),
deployed on the Easypanel project `onebspace`. Adapted from the proven
[`stateless-container-for-onebspace-development`](../stateless-container-for-onebspace-development)
blueprint (battle-tested Sep 2026 on Odoo 19) — same architecture, retargeted:
| Item | Value |
|---|---|
| App service | `one-os-dev-codespace` |
| DB service | `one-os-dev-codespace-db` (postgres:17 + pgWeb + dbGate) |
| Host port | **18070** → container 8069 (18069 stays with the Odoo 19 os-dev codespace) |
| Bind mount | `/root/Documents/trae_projects/one_b_os/one-os-dev` → `/mnt/one-os-dev` (rw) |
| Base image | `python:3.12-slim` (inline Dockerfile, heredoc ENTRYPOINT) |
| Hot reload | `--dev=reload,qweb,assets,xml,werkzeug` |
| Filestore | named volume `one-os-dev-codespace-filestore` → `/var/lib/odoo` |
## Deploy (one command + two MCP calls)
> **Odoo 20 delta (2026-11-10):** the generated `odoo.conf` now sets
> `http_interface = 0.0.0.0` and `http_port = 8069`. Odoo 20's
> `odoo/tools/config.py` defaults `http_interface` to `127.0.0.1` (and
> force-resets it when empty), and the legacy `xmlrpc_port` key no longer
> exists — without this fix Odoo binds loopback only and every request from
> Traefik/the swarm VIP dies with `connection refused` → HTTP 502.
```bash
python3 deploy.py prepare # regenerates easypanel.schema.json, inline.Dockerfile, init-odoo.sh, .db_password
```
Then (TRAE / agent with the Easypanel MCP):
1. `createFromSchema` with the JSON from `easypanel.schema.json`
2. `deployAppService` `{projectName: "onebspace", serviceName: "one-os-dev-codespace"}`
3. First boot ≈ 5 min (pip install /mnt/one-os-dev builds lxml/pillow/python-ldap)
4. `curl -sS -o /dev/null -w '%{http_code}\n' http://127.0.0.1:18070/web/database/manager` → 200
5. DB manager master password: `admin` (in `.db_password` is the postgres password)
## Before first boot — put the source where the bind mount expects it
```bash
git clone https://agents-apps-and-tools-gitea.nxldoy.easypanel.host/1b-agent/one-os-dev.git \
/root/Documents/trae_projects/one_b_os/one-os-dev -b 20.0
```
Live workflow: edit any `.py`/`.xml`/`.js` under that tree — changes go live on next request,
no restart, no image rebuild (see the upstream blueprint README §5 for details/troubleshooting).