# Remote deployment foundation AccuPedia remote environments are provisioned with Ansible through `ansible-runner`. Docker Compose is the runtime deployment mechanism on each target host. ## Topology Inventory groups describe service roles: `backend`, `database`, `redis`, and `proxy`. `docker_hosts` is the aggregate group used for common host preparation. A host can belong to one or several service groups, so dev can be a single machine while production can split services across machines. Compose is host-local. Do not assume Docker Compose service DNS works between separate servers; cross-host service endpoints must use private network DNS/IP addresses and appropriate access controls. ## Initial setup Install deployment dependencies locally: ```bash pip install -e ".[deployment]" ``` Edit `ansible/inventories//hosts.yml`, including `ansible_user` or SSH variables as required. Do not commit passwords, tokens, database credentials, or application secrets to inventory. Validate SSH, facts, supported OS, and privilege escalation: ```bash acupedia-ops remote preflight --env dev ``` Prepare the hosts idempotently: ```bash acupedia-ops remote prepare --env dev ``` Use `--limit ` to restrict execution and `--check` with `prepare` for Ansible check mode. `-v` through `-vvvv` increases Ansible verbosity. ## Host state created by prepare The initial implementation supports Debian/Ubuntu hosts. It installs common packages, creates the `acupedia` system account and `/opt/acupedia` hierarchy, installs Docker Engine from the distribution packages, installs the Docker Compose v2 plugin, enables Docker, and verifies `docker compose`. The application/database/Redis/proxy Compose deployments are deliberately not part of this foundation and remain separate subsequent roles.