@@ -81,6 +81,34 @@ Each `deploy-*` invocation initialises the driver's source in the
8181builder (wipe-and-reclone).
8282
8383
84+ ** Deploy via Docker Compose** (runs chatmail inside Docker-in-LXC):
85+
86+ # Pull a pre-built image directly from GHCR
87+ cmlxc docker deploy --source ghcr:main dk0
88+ cmlxc docker deploy --source ghcr:sha-ce05b26 dk0
89+
90+ # Load a local image tarball
91+ cmlxc docker deploy --image ./chatmail.tar dk0
92+
93+ # Inject a locally-built image from the host Docker daemon
94+ cmlxc docker deploy --source docker:chatmail-relay:latest dk0
95+
96+ Pull a newer image into an already-deployed relay:
97+
98+ cmlxc docker pull dk0
99+ cmlxc docker pull dk0 --tag sha-ce05b26
100+
101+ Inspect running services and logs:
102+
103+ cmlxc docker ps dk0
104+ cmlxc docker logs dk0
105+ cmlxc docker logs dk0 -f
106+
107+ SSH into a Docker service (auto-configured by `` cmlxc `` ):
108+
109+ ssh chatmail@dk0.localchat
110+
111+
84112** Run integration tests** inside the builder:
85113
86114 cmlxc test-mini cm0
@@ -167,13 +195,14 @@ the host only needs `cmlxc` itself.
167195
168196** Relay containers** (e.g. ` cm0-localchat ` , ` mad1-localchat ` ) --
169197ephemeral containers that receive a deployed chatmail service.
170- Each relay is locked to a single deployment driver (` cmdeploy ` or
171- ` madmail ` ); switching requires destroying and re-creating the container.
198+ Each relay is locked to a single deployment driver (` cmdeploy ` ,
199+ ` madmail ` , or ` docker ` ); switching requires destroying and re-creating
200+ the container.
172201
173202
174203### Deployment drivers
175204
176- Drivers live in ` driver_cmdeploy.py ` and ` driver_madmail .py` .
205+ Drivers live in ` driver_cmdeploy.py ` , ` driver_madmail.py ` , and ` driver_docker .py` .
177206Each driver module exports its CLI subcommand metadata,
178207builder init, and deploy orchestration.
179208` cli.py ` generates the ` deploy-* ` subcommands from a ` DRIVER_BY_NAME ` mapping.
@@ -187,6 +216,45 @@ builder init, and deploy orchestration.
187216 pushes it via SCP and runs ` madmail install --simple --ip <IP> ` .
188217 No DNS entries are needed.
189218
219+ - ** docker** -- deploys chatmail via Docker Compose inside a Docker-in-LXC
220+ relay container (` security.nesting=true ` ), either directly pulled from GHCR or
221+ injected from a host docker instance. Docker is installed inside the relay
222+ automatically; no host Docker installation is required.
223+
224+ #### Docker subcommands
225+
226+ - ` docker deploy RELAY ` -- deploy chatmail into a relay container via
227+ Docker Compose. Three image sources are supported:
228+ - ` --source ghcr:TAG ` -- pull a pre-built image from GHCR directly
229+ into the relay. No builder container is involved.
230+ - ` --source docker:TAG ` -- pipe a locally-built image from the host
231+ Docker daemon into the relay via ` docker save | docker load ` .
232+ - ` --image PATH ` -- load a pre-exported image tarball.
233+ A docker-compose.yaml is fetched from
234+ [ chatmail/docker] ( https://github.com/chatmail/docker ) unless
235+ ` --compose URL ` overrides the source.
236+
237+ - ` docker pull RELAY ` -- pull a newer image from GHCR into an already
238+ deployed relay without a full redeploy. Use ` --tag ` to specify the
239+ image tag (default: ` main ` ).
240+
241+ - ` docker ps RELAY ` -- list running Docker Compose services in a relay.
242+
243+ - ` docker logs RELAY ` -- show Docker Compose logs (last 100 lines).
244+ Pass ` -f ` to follow in real time.
245+
246+ - ` docker shell RELAY [SERVICE] ` -- open an interactive shell inside
247+ the named Compose service (default: ` chatmail ` ).
248+
249+ #### SSH into Docker services
250+
251+ For Docker-deployed relays, ` cmlxc ` auto-generates SSH config entries for
252+ each running Compose service. After any deploy or ` cmlxc status ` , you can:
253+
254+ ssh chatmail@dk0.localchat
255+
256+ This uses ` ProxyCommand ` to run ` docker exec ` inside the LXC container.
257+
190258
191259## Releasing
192260
0 commit comments