Skip to content

Fix Docker networking: migrate API from host to bridge network#4

Merged
ShumaKitayama merged 2 commits intofeature-backendfrom
copilot/sub-pr-3
Nov 6, 2025
Merged

Fix Docker networking: migrate API from host to bridge network#4
ShumaKitayama merged 2 commits intofeature-backendfrom
copilot/sub-pr-3

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Nov 6, 2025

The API service was using network_mode: host while nginx used bridge networking, preventing container name resolution and inter-service communication.

Changes:

  • docker-compose.yml

    • Remove network_mode: host from API service
    • Add API service to buildup-network bridge network
    • Bind API to 0.0.0.0 instead of 127.0.0.1
    • Add port mapping 8080:8080
  • nginx/default.conf

    • Update proxy_pass to use container name: http://api:8080 instead of http://127.0.0.1:8080
    • Applied to both /api/ and /ws/ locations

This enables Docker DNS-based service discovery between nginx and API containers.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

…esolution

Co-authored-by: ShumaKitayama <174303068+ShumaKitayama@users.noreply.github.com>
Copilot AI changed the title [WIP] WIP address feedback from review on feature backend PR Fix Docker networking: migrate API from host to bridge network Nov 6, 2025
Copilot AI requested a review from ShumaKitayama November 6, 2025 02:36
@ShumaKitayama ShumaKitayama marked this pull request as ready for review November 6, 2025 03:57
@ShumaKitayama ShumaKitayama merged commit 09747f2 into feature-backend Nov 6, 2025
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