|
|
||
|---|---|---|
| .vscode | ||
| acupedia_ops | ||
| ansible | ||
| config | ||
| docs | ||
| tests | ||
| .gitignore | ||
| README.md | ||
| docker-compose.dev.yml | ||
| docker-compose.local.yml | ||
| docker-compose.prod.yml | ||
| pyproject.toml | ||
| requirements.txt | ||
| uv.lock | ||
README.md
acupedia-ops
Operational tooling for AccuPedia.
The repository owns:
- reusable content/data preprocessing;
- local development orchestration;
- backend bootstrap invocation through a CLI boundary;
- remote deployment orchestration;
- Gitea Actions runner lifecycle;
- Ansible playbooks/roles;
- operational validation and shared utilities.
It does not own application business logic and does not import app.* from
acupedia-api.
Installation
python -m venv .venv
source .venv/bin/activate
pip install -e .
For Ansible/deployment support:
pip install -e ".[deployment]"
Development:
pip install -e ".[dev]"
Workspace base path
Local repositories can be configured relative to one canonical workspace root:
ACUPEDIA_WORKSPACE_BASE_PATH=/home/amit/Work/Project/acupedia
ACUPEDIA_API_PATH=acupedia-api
ACUPEDIA_MOBILE_PATH=acupedia-mobile-ui
ACUPEDIA_WEB_PORTAL_PATH=acupedia-web-portal
ACUPEDIA_ADMIN_PORTAL_PATH=acupedia-admin-portal
ACUPEDIA_CONTENT_PATH=acupedia-content
ACUPEDIA_OPS_PATH=acupedia-ops
Relative paths are always resolved against ACUPEDIA_WORKSPACE_BASE_PATH,
never against the current working directory. Absolute component paths remain
supported.
Local workspace
cp .env.example .env
acupedia-ops local validate
acupedia-ops local setup
Typical local flow:
acupedia-ops local infra-up
acupedia-ops local bootstrap content --publish-content
Then, in separate terminals:
acupedia-ops local run api
acupedia-ops local run mobile
For complete documentation see:
docs/local-development.mddocs/gitea-runner-lifecycle.md
Local commands
acupedia-ops local validate
acupedia-ops local setup [--install]
acupedia-ops local status [--json]
acupedia-ops local run api|mobile|web|admin
acupedia-ops local infra-up
acupedia-ops local infra-down
acupedia-ops local infra-restart
acupedia-ops local infra-status
acupedia-ops local logs
acupedia-ops local bootstrap [auth|content|media|commerce|all|validate]
acupedia-ops local reset-db [--execute]
Backend bootstrap boundary
The bootstrap implementation remains in acupedia-api. acupedia-ops resolves
and invokes the backend-owned acupedia-bootstrap executable instead of
importing backend Python internals.
Direct usage is also available:
acupedia-ops bootstrap content \
--api-root ../acupedia-api \
-- \
--config ../acupedia-content/config.json \
--modules-root ../acupedia-content
Image preprocessing
acupedia-ops image clean-border input.jpg output.jpg
Directory and ZIP processing remain supported.
Gitea runner lifecycle
export GITEA_RUNNER_REGISTRATION_TOKEN='...'
acupedia-ops runner provision \
--inventory ansible/inventories/gitea-runners.yml
See docs/gitea-runner-lifecycle.md.
Remote deployment
acupedia-ops deploy backend --env dev
acupedia-ops deploy database --env dev
Local development deliberately uses native dev processes and Docker Compose. Ansible remains the remote deployment/configuration mechanism.