Skip to content

develop(common-configuration): listen on 0.0.0.0:$PORT everywhere, and describe the application settings - #1065

Merged
davlgd merged 6 commits into
mainfrom
davlgd-port-listening
Nov 6, 2026
Merged

davlgd merged 6 commits into
mainfrom
davlgd-port-listening

Conversation

@davlgd

@davlgd davlgd commented Nov 6, 2026

Copy link
Copy Markdown
Collaborator

📝 Summary

This PR rewrites the common configuration page around the port your application listens on, and applies the same rule to the whole documentation, guides excluded. Behaviors were checked against the code, then tested on deployed applications: Node.js with and without Varnish, Python with CC_RUN_COMMAND, .NET, a custom Caddyfile, Java WAR and Spring Boot, region change, zero downtime deployment, sticky sessions, Force HTTPS, and build instances on pico, nano and XS.

The rule: an application starting its own HTTP server listens on 0.0.0.0:$PORT. Clever Cloud sets PORT to 8080, so it doesn't belong in environment variables or code; with Request Flow, set PORT=9000. Frameworks listening on another port, runtimes with a managed web server, Docker, Network Groups and TCP redirections are covered.

The common configuration page now covers:

  • Listen on the right port, with Request Flow, frameworks listening on another port, runtimes with a managed web server, and other ports
  • Application settings: region, zero downtime deployment, sticky sessions, dedicated build instance, cancel deployment on push, Force HTTPS, Clever Task
  • Private SSH key
  • Cards to the other settings pages

Other pages:

  • Runtime pages: .NET, Elixir, FrankenPHP, Go, Haskell, Java, Linux, Meteor, Node.js, Python, Rust, Scala, Static, V, and the applications index
  • Request Flow and Varnish: PORT=9000 when a middleware runs, and the runtimes that need no configuration
  • Lifecycle: the application settings point to the common configuration page, and links to them are updated
  • Environment variables reference, Mise, metrics, troubleshooting and Elastic APM examples: the port comes from PORT

🧪 Type of Change

  • ⚠️ Bug fix
  • 📅 Changelog update
  • 📚 Documentation update
  • ✨ New content/feature
  • 🔧 Technical/maintenance

✅ Validation

  • Read the contributing guidelines
  • Verify content accuracy and links
  • Run relevant checks and builds
  • Check the rendered result when the change affects layout or formatting

@davlgd
davlgd requested a balanced review from Copilot November 6, 2026 14:37
@github-actions

github-actions Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

👋` Review app deleted

You closed this PR and deleted the review app.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The port-configuration guidance lacks necessary qualifications for ASP.NET Core, Java, and native uv deployments, potentially causing requests to reach the wrong port or leaving applications unreachable.

3 open issues
What changed in this PR

This PR centralizes application port and settings guidance, then updates runtime documentation and examples to reference it.

Changes:

  • Standardizes guidance around 0.0.0.0:$PORT, including Request Flow and runtime-specific exceptions.
  • Expands common configuration with application settings and navigation cards.
  • Updates examples and links across deployment, observability, and troubleshooting documentation.
File Description
shared/​request-flow.md Updates shared middleware port guidance.
content/​doc/​security/​ssl.md Links to the new Force HTTPS section.
content/​doc/​find-help/​troubleshooting.md Uses PORT in the Node.js example.
content/​doc/​develop/​request-flow/​varnish.md Explains backend ports and managed runtimes.
content/​doc/​develop/​request-flow/​_index.md Clarifies runtime exceptions and disabling services.
content/​doc/​develop/​observability/​metrics.md Reads PORT in the Haskell example.
content/​doc/​develop/​mise.md Updates the task description to reference $PORT.
content/​doc/​develop/​common-configuration/​lifecycle.md Replaces settings details with a central link.
content/​doc/​develop/​common-configuration/​environment-variables/​reference.md Clarifies PORT and Python exceptions.
content/​doc/​develop/​common-configuration/​_index.md Centralizes port rules and application settings.
content/​doc/​deploy/​databases/​elastic.md Uses ${PORT} in the APM configuration example.
content/​doc/​deploy/​applications/​v.md Links to shared port requirements.
content/​doc/​deploy/​applications/​static.md Documents Request Flow and custom Caddyfile ports.
content/​doc/​deploy/​applications/​scala/​_index.md Explains http.port and Play behavior.
content/​doc/​deploy/​applications/​rust.md Updates port guidance and build-instance links.
content/​doc/​deploy/​applications/​python/​uv.md Clarifies middleware ports and command arguments.
content/​doc/​deploy/​applications/​python/​_index.md Explains custom-command ports behind Nginx.
content/​doc/​deploy/​applications/​nodejs.md Links to shared port requirements.
content/​doc/​deploy/​applications/​meteor.md Clarifies supplied PORT and updates a settings link.
content/​doc/​deploy/​applications/​linux.md Links to shared port requirements.
content/​doc/​deploy/​applications/​java/​java-war.md Describes automatic container port configuration.
content/​doc/​deploy/​applications/​java/​java-maven.md References the supplied http.port property.
content/​doc/​deploy/​applications/​java/​java-jar.md Documents http.port and Request Flow.
content/​doc/​deploy/​applications/​java/​java-gradle.md Documents http.port and Request Flow.
content/​doc/​deploy/​applications/​haskell.md Updates server examples to read PORT.
content/​doc/​deploy/​applications/​golang.md Links to shared port requirements.
content/​doc/​deploy/​applications/​frankenphp.md Clarifies managed ports and custom commands.
content/​doc/​deploy/​applications/​elixir.md Adds port guidance for Phoenix configuration.
content/​doc/​deploy/​applications/​dotnet.md Explains ASP.NET Core’s required port setting.
content/​doc/​deploy/​applications/​docker.md Updates the dedicated build-instance link.
content/​doc/​deploy/​applications/​_index.md Updates common application port guidance.
.github/​styles/​config/​vocabularies/​Doc/​accept.txt Accepts “Vlang” in editorial checks.

Review effort: Balanced

Comment thread shared/request-flow.md Resolved
@davlgd
davlgd merged commit db33842 into main Nov 6, 2026
6 of 7 checks passed
@davlgd
davlgd deleted the davlgd-port-listening branch November 6, 2026 14:49

This branch was previously deployed

1 inactive deployment
update doc — 79b9cfed Deployed Nov 6, 2026 by davlgd via Check externally maintained guides #1716
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.

2 participants