Skip to content

Fix: align Dockerfile PORT with Container App targetPort#4

Merged
crarau merged 1 commit into
mainfrom
fix/dockerfile-port-mismatch
Apr 20, 2026
Merged

Fix: align Dockerfile PORT with Container App targetPort#4
crarau merged 1 commit into
mainfrom
fix/dockerfile-port-mismatch

Conversation

@crarau

@crarau crarau commented Apr 20, 2026

Copy link
Copy Markdown
Contributor

Root Cause

Commit f369086 changed the Dockerfile from PORT=3000 to PORT=8347 to follow the port assignment policy, but the Azure Container App's ingress targetPort was never updated from 3000.

This caused:

  1. New revisions listen on port 8347 but the ingress proxy routes to port 3000
  2. New revision marked Unhealthy/Degraded (health probes fail)
  3. Container Apps falls back to old revision (0000002, April 1) that uses PORT=3000
  4. Old revision lacks /api/catalog (added later) → 404 errors
  5. Old revision has /api/health → appears to work fine

Fix

Revert ENV PORT and EXPOSE to 3000 in the Dockerfile to match the Container App's targetPort: 3000. Once the new revision starts on port 3000, the ingress proxy can reach it, and all routes (including /api/catalog) will be served from the latest code.

Alert Reference

Triggered by production alert at 2026-04-20T16:40:04.580Z: 13 errors on ideaplaces-website fetching https://c3.ideaplaces.com/api/catalog (404).

Testing

  • All 158 unit/integration tests pass
  • Docker image built and tested locally with PORT=3000: both /api/health (200) and /api/catalog (200) respond correctly
  • Confirmed that Container App ingress targetPort is 3000

The Container App ingress routes to port 3000, but commit f369086
changed the Dockerfile to PORT=8347. This caused the new revision
to be unreachable (Unhealthy/Degraded), with Container Apps falling
back to the old April 1 revision that lacks the /api/catalog route.

Reverting to PORT=3000 restores connectivity so the latest revision
serves all routes including the catalog endpoint.
@crarau
crarau merged commit a0fee3a into main Apr 20, 2026
2 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.

1 participant