Skip to content

Bind server to 0.0.0.0 for container/cloud compatibility#1

Merged
cv-gh merged 4 commits intomainfrom
copilot/modify-listen-ip-address
Feb 3, 2026
Merged

Bind server to 0.0.0.0 for container/cloud compatibility#1
cv-gh merged 4 commits intomainfrom
copilot/modify-listen-ip-address

Conversation

Copy link

Copilot AI commented Feb 3, 2026

Server was binding to localhost/127.0.0.1, preventing external connections in containerized environments and app service deployments.

Changes

  • Line 340: Changed run_app() host parameter from "localhost" to "0.0.0.0"

    • Enables connections from any network interface
    • Required for Docker, Kubernetes, Azure App Service
  • Line 335: Updated console output to reflect binding behavior

    # Before
    print(f"🚀 Server: localhost:{port}")
    
    # After  
    print(f"🚀 Server: Listening on 0.0.0.0:{port} (all interfaces)")

Notes

Socket connection check (line 328) correctly remains at 127.0.0.1 - connecting to 0.0.0.0 is invalid. Endpoint URLs in console output remain localhost for local testing UX.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 3 commits February 3, 2026 09:52
Co-authored-by: cv-gh <8566560+cv-gh@users.noreply.github.com>
Co-authored-by: cv-gh <8566560+cv-gh@users.noreply.github.com>
Co-authored-by: cv-gh <8566560+cv-gh@users.noreply.github.com>
Copilot AI changed the title [WIP] Update host_agent_server.py to listen on all IP addresses Bind server to 0.0.0.0 for container/cloud compatibility Feb 3, 2026
@cv-gh cv-gh requested a review from Copilot February 3, 2026 10:14
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates the Python sample agent host to bind the web server to all interfaces to support external connectivity in containers and cloud app hosting.

Changes:

  • Changed the aiohttp server bind host from localhost to 0.0.0.0.
  • Updated the startup console banner to reflect that the server is listening on all interfaces.

@cv-gh cv-gh marked this pull request as ready for review February 3, 2026 10:31
@cv-gh cv-gh merged commit 9a32048 into main Feb 3, 2026
6 checks passed
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