Fix default listen port to match deployment assets#255
Open
Lougarou wants to merge 1 commit into
Open
Conversation
appsettings.json hardcoded Urls to http://*:5098, which overrode the ASPNETCORE_URLS env var set by the Dockerfile and caused the container to listen on 5098 while docker-compose, the Helm chart, prometheus scrape config and docs all expected 5000. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
src/replicator/appsettings.jsonhardcoded"Urls": "http://*:5098", which wins over theASPNETCORE_URLSenv var that the Dockerfile sets tohttp://*:5000. Result: the container listens on 5098 by default.DockerfileEXPOSE 5000/ENV ASPNETCORE_URLS,compose/docker-compose.yml5000:5000,compose/prometheus.ymlscrape targetreplicator:5000,charts/replicator/templates/service.yaml(prometheus.io/port: "5000",port: 5000,targetPort: 5000),charts/replicator/templates/statefulset.yamlprobes/container port 5000, and the docs (docs/src/content/docs/deployment/docker.mdx→ http://localhost:5000).ASPNETCORE_URLSat deploy time does not fix it, becauseappsettings.jsonis a later config source in the running app.This PR changes the bundled default to
http://*:5000, aligning the app with the rest of the deployment stack.Reproduction (before fix)
After fix
Test plan
docker build .succeeds:5000(confirm via logs andcurl /metrics)docker compose -f compose/docker-compose.yml up— Prometheus at :9090 shows thereplicatortarget as UP and scrapes metrics:5000pass, service scraping worksdotnet run --project src/replicatorstill starts (UI/metrics now on:5000locally too; previously:5098)🤖 Generated with Claude Code