Skip to content

docs: run Collabora Online (CODE) in the docker-compose example#1570

Open
DeepDiver1975 wants to merge 2 commits into
masterfrom
docs/docker-compose-collabora-code
Open

docs: run Collabora Online (CODE) in the docker-compose example#1570
DeepDiver1975 wants to merge 2 commits into
masterfrom
docs/docker-compose-collabora-code

Conversation

@DeepDiver1975

Copy link
Copy Markdown
Member

Summary

Extends the Server v11 docker-compose example so it also starts a Collabora Online Development Edition (CODE) container, wired to ownCloud end-to-end. Previously the example ran only owncloud/server + mariadb + redis over plain HTTP.

Because the Collabora editor is embedded via an iframe and a WebSocket, both ownCloud and Collabora must be served over HTTPS on their own hostnames — browsers block the mixed HTTP/HTTPS content a plain-HTTP setup produces. A Traefik reverse proxy is therefore added to terminate TLS (Let's Encrypt), redirect HTTP→HTTPS, and route the two domains; the owncloud service moves from a published port to proxy labels.

Changes

  • docker-compose.yml — new always-on collabora (collabora/code, 9980) and proxy (Traefik) services; ownCloud exposed via Traefik labels; new acme volume for certificates.
  • dot.env — real hostnames instead of localhost; new COLLABORA_DOMAIN, OWNCLOUD_DOMAIN_REGEX, COLLABORA_IMAGE, Collabora admin creds, TRAEFIK_IMAGE, LETSENCRYPT_EMAIL; dropped obsolete HTTP_PORT.
  • installing_with_docker.adoc — TLS/two-host explanation, expanded .env settings table, updated docker compose ps output (collabora + proxy), and a new "Enabling Collabora Online (CODE)" section covering app:enable richdocuments and config:app:set richdocuments wopi_url, linking to the existing Collabora / occ pages.

Notes

  • The CODE integration is documented against the Enterprise richdocuments app (what the repo documents today); the repo's own note flags its OC11 availability as "under review". The collabora container itself is edition-independent.

Verification

  • docker compose config validates the file.
  • Full Antora build of the page succeeds; rendered HTML shows the new services, the new section/anchor, and the wopi_url command, with no unresolved AsciiDoc attribute tokens.

🤖 Generated with Claude Code

Extend the Server v11 docker-compose example to start a Collabora Online
Development Edition (CODE) container so documents can be edited in the
browser, wired to ownCloud end-to-end.

Because the Collabora editor is embedded via an iframe and a WebSocket, both
ownCloud and Collabora must be served over HTTPS on their own hostnames. A
Traefik reverse proxy is added to terminate TLS (Let's Encrypt) and route the
two domains; the ownCloud service moves from a published port to proxy labels.

The page gains a TLS/two-host explanation, an expanded .env settings table,
the collabora/proxy containers in the `docker compose ps` output, and an
"Enabling Collabora Online (CODE)" section covering the richdocuments app and
`wopi_url` occ wiring.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Thomas Müller <1005065+DeepDiver1975@users.noreply.github.com>
@DeepDiver1975
DeepDiver1975 requested a review from a team as a code owner July 24, 2026 13:10
…arness

Security review of the internet-facing compose example surfaced several
remotely exploitable defaults now that it is framed as a production setup:

- Remove the published host ports from MariaDB (3306) and Redis (6379); they
  are reached only over a new internal "backend" network. An exposed,
  weakly-authenticated database and an unauthenticated Redis on a public host
  were directly exploitable.
- Split the topology into "frontend" (proxy, ownCloud, Collabora) and
  "backend" (ownCloud, MariaDB, Redis) networks so the edge proxy and Collabora
  cannot address the data tier.
- Restrict the Collabora CODE admin console (/browser/dist/admincontrol,
  /cool/adminws) with a higher-priority Traefik router guarded by an ipallowlist
  middleware, instead of exposing it publicly with admin/admin.
- Add an HSTS headers middleware on the ownCloud router only (a framing policy
  would break the embedded editor iframe).
- Move all credentials to the .env file with CHANGE_ME_* placeholders, define
  the previously-undefined ADMIN_* and DB password variables, and use distinct
  root vs. app database passwords.

Document the residual caveats (change credentials, keep the data tier private,
never expose the admin console, the Docker-socket-as-root trade-off, pin image
versions) next to the compose block, and correct the "docker compose ps" note.

Add a QA harness under tests/docker-compose/ that boots the shipped example
(via a self-signed-TLS override + runnable test env) and smoke-tests it:
status.php reports installed, Collabora serves WOPI discovery, and 3306/6379
are confirmed closed. Wire it up as "npm run test:compose" and a paths-filtered
GitHub Actions workflow, and add the docker ecosystem to Dependabot.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Thomas Müller <1005065+DeepDiver1975@users.noreply.github.com>
@DeepDiver1975

Copy link
Copy Markdown
Member Author

Follow-up QA commit (a2e8af8): security review, a local test harness, and CI.

Security hardening of the compose example

  • Removed the published host ports on MariaDB (3306) and Redis (6379) — they now live on an internal backend network only. Reframed as an internet-facing setup, an exposed weakly-authenticated DB and an unauthenticated Redis were directly exploitable.
  • Split the topology into frontend (proxy, ownCloud, Collabora) and backend (ownCloud, MariaDB, Redis) so the edge proxy and Collabora cannot reach the data tier.
  • Restricted the Collabora CODE admin console (/browser/dist/admincontrol, /cool/adminws) behind a higher-priority Traefik router + ipallowlist middleware instead of exposing it publicly with admin/admin.
  • Added an HSTS middleware on the ownCloud router only (a framing policy would break the embedded editor iframe).
  • Moved all credentials to .env with CHANGE_ME_* placeholders; defined the previously-undefined ADMIN_*/DB vars; distinct root vs. app DB passwords.
  • Documented the residual caveats next to the compose block (change credentials, keep the data tier private, never expose the admin console, the Docker-socket-as-root trade-off, pin image versions).

Local test harness (tests/docker-compose/, kept out of the Antora examples/ tree)

  • A self-signed-TLS override + runnable test.env boot the actual shipped compose file, then assert: all healthchecks green, status.phpinstalled:true, Collabora /hosting/discovery returns WOPI XML, and 3306/6379 are closed on the host.
  • Run with npm run test:compose. Verified locally: passes end to end and tears down cleanly.

CI + Dependabot

  • New paths-filtered compose-test.yml workflow lints (docker compose config) and runs the smoke test on PRs touching the example/harness. Action SHA-pinned.
  • Added the docker ecosystem to Dependabot.

Note: the compose image tags are .env-interpolated, so the Dependabot docker entry will not find literal tags to bump in the shipped file (the concrete pins live in test.env); the entry is kept to future-proof any literal tags. The test harness pins Traefik v3.6 (vs. the example's v3.3) because Traefik < 3.6 probes the Docker daemon with API v1.24, which Docker Engine >= 29 refuses — routing/TLS behaviour under test is identical.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant