SPCBotSPCBot Docs

Addon Dependencies

Learn how addon dependencies work in SPCBot and how to configure them for your team.

Visual Guide

Drop real screenshots into the paths below. This grid is rendered by src/app/docs/components/image-placeholder.tsx.

Dashboard Overview

Main dashboard with stats and recent deployments

public/docs/images/dashboard-overview.png

Server List

Connected servers and their health status

public/docs/images/servers-list.png

Deployment View

Live deployment logs and progress

public/docs/images/deployment-view.png

Odoo modules sometimes need extra Python packages beyond what's already installed in the base image — think PyJWT for a JWT-signing integration, or cryptography for a bank API connector. SPCBot detects and installs these automatically on every deploy, so you never need to hand-patch a running container again.

Just add a requirements.txt

Drop a standard pip requirements.txt file inside your module directory and SPCBot installs it — no dashboard configuration, no environment variables, nothing to toggle on.

How To Use It

Put a requirements.txt file inside your module's own directory in the addon repository, next to its __manifest__.py. For example:

cmn_accounting/bank_statement_api_integration/requirements.txt

With normal pip-formatted lines inside, one dependency per line:

PyJWT==2.8.0
cryptography==41.0.7

Commit and push it along with the rest of the module. On the next deploy (or Quick Update), SPCBot finds it and installs it automatically — nothing else to configure.

How It Works

  • On deploy, SPCBot scans every mounted addon repo and project repo for the environment, looking for any file named requirements.txt — up to 4 directory levels deep, with .git directories skipped
  • Every requirements.txt found is pip-installed in one pass
  • Packages are installed into a host directory (<deployDir>/pylibs) that is bind-mounted into the Odoo container at /mnt/pylibs, with PYTHONPATH=/mnt/pylibs set on the Odoo service
  • Installs are hash-based: if none of the environment's requirements.txt files changed since the last deploy, the install step is skipped entirely — redeploys stay fast and don't need network access when nothing changed
Why not just pip install inside the container?

Anything installed inside a running container with a plain pip install is destroyed the next time the environment is deployed — the container is recreated fresh from the image every deploy, so any manual package would silently disappear. Installing to the host-mounted /mnt/pylibs directory instead is what makes the packages survive redeploys, restarts, and even a full container recreation.

What You'll See In The Deploy Log

A successful install looks like this in the deployment log's [setup] lines:

[info] [setup] Installing Python requirements from 1 file(s): bank_statement_api_integration/requirements.txt
[info] [setup] Python requirements installed: PyJWT-2.8.0 cffi-2.1.0 cryptography-41.0.7 pycparser-3.0

Existing Environments

An environment created before this feature shipped needs one redeploy for it to take effect — the generated docker-compose.yml has to regenerate to add the /mnt/pylibs mount and the PYTHONPATH environment variable. After that first redeploy, subsequent deploys and Quick Updates pick up requirements.txt changes automatically.

If pip Fails

A failed install does not fail the deploy. Instead:

  • A warning is written to the deployment log explaining that modules importing the missing package(s) will not load
  • The actual pip error is included in the log line, so you can see exactly what went wrong (bad version pin, package name typo, network issue reaching PyPI, etc.)
  • Odoo's own health check then surfaces the real symptom — the module that needed the package fails to load
  • The install is retried automatically on the next deploy; you don't need to trigger anything special once the underlying requirements.txt is fixed

Troubleshooting

SymptomWhat To Check
ModuleNotFoundError: No module named 'X' after a deployCheck the deploy log's [setup] lines first — they show whether the install ran and whether it succeeded
No [setup] lines about Python requirements at allConfirm the requirements.txt is actually inside the module directory (not the repo root or a parent folder more than 4 levels up) and is committed and pushed
Install step never runsConfirm the addon repo containing the module is actually mounted on this environment
Install runs but a specific package failsRead the pip error text in the deploy log line — it's the real pip output, not a generic failure message
Package worked before but broke after a redeployThe environment was created before this feature shipped and needs one redeploy to pick up the new mount — see "Existing Environments" above
Retire the old manual workaround

Earlier, some environments worked around missing packages with a manual docker exec -u root <env>_odoo pip3 install --break-system-packages ... command run directly on the server. That workaround is no longer needed — and never actually persisted anyway, since anything installed that way was wiped on the next container recreation. Use a requirements.txt in the module directory instead.