Skip to content

Docker: run community and business side by side - #13365

Draft
ericholscher wants to merge 5 commits into
mainfrom
side-by-side-docker-envs
Draft

ericholscher wants to merge 5 commits into
mainfrom
side-by-side-docker-envs

Conversation

@ericholscher

@ericholscher ericholscher commented Oct 5, 2026 •

Copy link
Copy Markdown
Member

Lets the community and business local environments run at the same time (readthedocs/common#335 has the design). Companion: readthedocs/readthedocs-corporate#2158.

This PR:

  • Links common's services.conf.template and side-by-side.conf.template into dockerfiles/nginx/, and defaults community to forward .devthedocs.com to port 10081. If business isn't running, those domains get a 502 from this NGINX.
  • RTD_EXT_THEME_DEV_SERVER is now http://assets.{PRODUCTION_DOMAIN} instead of assets.devthedocs.org:10001. Business inherits it, so each environment uses its own webpack.
  • The CSP connect-src entry for webpack's live reload websocket follows that URL, and is only added when the dev server is set. Before, ws://{PRODUCTION_DOMAIN}:10001/ws was added unconditionally, including in production.
  • The upload API's presigned URL points at storage.{PRODUCTION_DOMAIN}, not 127.0.0.1:9000.
  • Documents the hostnames, the side-by-side setup and its memory needs in docs/dev/install.rst. Both stacks take about 11 GB, and with Docker's default limit the OOM killer took a webpack container, which left a dashboard unstyled.

The common submodule points at the #335 branch commit. It needs a re-bump to main once that merges.

🤖 Generated with Claude Code

The webpack dev server URL and the presigned upload URL hardcoded the
default host ports. Read RTDDEV_PORT_WEBPACK and RTDDEV_PORT_STORAGE so
community and business can run side by side (readthedocs/common#335).

Bumps common to the companion branch and documents the setup.
@read-the-docs-community

read-the-docs-community Bot commented Oct 5, 2026 •

Copy link
Copy Markdown

ericholscher added a commit to readthedocs/common that referenced this pull request Oct 5, 2026
The community NGINX routes *.devthedocs.com to business instead
(readthedocs/readthedocs.org#13365).
Replace the front proxy with the shared side-by-side NGINX template from
common: whichever environment owns port 80 forwards the other one's
domains to it.
@ericholscher ericholscher changed the title Docker: follow configurable host ports for webpack and storage Docker: run community and business side by side Oct 5, 2026
@read-the-docs-community

read-the-docs-community Bot commented Oct 5, 2026 •

Copy link
Copy Markdown

Documentation build overview

📚 dev | 🛠️ Build #34948945 | 📁 Comparing ff740a1 against latest (a61dfaa)

  🔍 Preview build  

1 file changed
± install.html

common now serves webpack, addons, storage and Elasticsearch by hostname
through NGINX instead of host ports. Point the webpack dev server URL,
its live reload CSP entry and the presigned upload URL at those
hostnames, and drop the per-port settings.
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