Files

41 lines
1.9 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)
```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).