Odoo 20's requirements.txt no longer ships the inotify python package, so --dev=reload logged "'inotify' module not installed. Code autoreload feature is disabled" and never restarted on file edits — breaking the core promise of this blueprint (live edits auto-apply). The init script now pip-installs inotify unconditionally after the requirements install (cheap no-op when already present).
51 lines
2.5 KiB
Markdown
51 lines
2.5 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.
|
|
> The init script also installs the `inotify` python package: Odoo 20's
|
|
> `requirements.txt` no longer ships it, and `--dev=reload` silently
|
|
> disables code autoreload without it.
|
|
|
|
```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).
|