Fix mongo url in compose files - #59
Merged
Merged
Conversation
The MONGO url in compose-server.yml and compose-demo.yml spelled the collection parameter as "collecion". go-pkgz/mongo strips only the parameters it is asked for, "db" and "collection", so the misspelled one stayed in the query string and the driver rejected the url with "error parsing uri: must have a / before the query ?". The server exited before reaching the syslog listener, so both compose files failed to start as shipped.
paskal
force-pushed
the
fix/compose-mongo-url-typo
branch
from
August 20, 2026 08:00
57602fb to
c4d0512
Compare
The MONGO url in compose-demo.yml addressed host "mongo" while the service and its hostname are "mongo-dkll", so the name did not resolve on the compose network.
umputun
approved these changes
Aug 20, 2026
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.
Two independent reasons the shipped compose files cannot start the server, and both are unambiguous.
The collection parameter is misspelled.
compose-server.yml:18andcompose-demo.yml:18spell itcollecion.app/cmd/server.go:111callsmongo.Connect(..., mongoURL, "db", "collection"), which extracts and strips exactly the parameters it is given; the misspelled one stays in the query string, and the driver is handedmongodb://mongo:27017?collecion=logs:README.md:70already documents the parameter ascollection. The typo came in with 9759606, which movedMONGOfrom a bare host to a full url.The demo points at a host that does not exist.
compose-demo.yml:18addressedmongo, while the service and its hostname aremongo-dkll(lines 60-62), so the name never resolved on the compose network.One blocker is left after this PR: the mongo service enables root authentication while the server connects anonymously, which I have written up with a reproduction and options in #63, since which way to fix it is your call.