Skip to content

Fix Docker Compose frontend-to-backend networking#8

Merged
thejoeyluu merged 2 commits intosetupfrom
copilot/sub-pr-6-again
Feb 18, 2026
Merged

Fix Docker Compose frontend-to-backend networking#8
thejoeyluu merged 2 commits intosetupfrom
copilot/sub-pr-6-again

Conversation

Copy link

Copilot AI commented Feb 17, 2026

The frontend container was configured to connect to localhost:8000, which resolves to itself rather than the backend service in Docker Compose networking.

Changes:

  • Set BACKEND_URL=http://backend:8000 environment variable in frontend service to use Docker's internal DNS resolution
frontend:
  build: ./frontend
  ports:
    - "5173:5173"
  environment:
    - BACKEND_URL=http://backend:8000  # Added
  volumes:
    - ./frontend:/app
    - /app/node_modules
  depends_on:
    - backend

The vite.config.js already reads process.env.BACKEND_URL, so no code changes were required.


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

Co-authored-by: Davictory2003 <68972845+Davictory2003@users.noreply.github.com>
Copilot AI changed the title [WIP] WIP to address feedback on initial project set-up Fix Docker Compose frontend-to-backend networking Feb 17, 2026
Copilot AI requested a review from Davictory2003 February 17, 2026 01:01
@thejoeyluu thejoeyluu marked this pull request as ready for review February 18, 2026 20:43
@thejoeyluu thejoeyluu merged commit 476e4d2 into setup Feb 18, 2026
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.

4 participants

Comments