Merge pull request 'ci: drop host port mapping for Mongo service container' (#8) from ci/fix-mongo-service-port-collision into main
Some checks failed
Lint and Build / format (push) Successful in 33s
Lint and Build / clippy (push) Successful in 1m41s
Lint and Build / build (push) Successful in 3m44s
Lint and Build / test (push) Failing after 2m54s

Reviewed-on: #8
This commit is contained in:
alvaro 2026-07-19 00:04:12 +00:00
commit 9807434c5f

View file

@ -111,8 +111,12 @@ jobs:
image: mongo:7 image: mongo:7
env: env:
MONGO_INITDB_DATABASE: normogen_test MONGO_INITDB_DATABASE: normogen_test
ports: # No `ports:` mapping: the job container reaches Mongo over the job's
- 27017:27017 # internal network via the service hostname (MONGODB_URI uses `mongo`,
# not localhost). Publishing to a host port is unnecessary and collides
# with any mongod already bound to :27017 on the runner host — which
# made the service container fail to schedule ("port is already
# allocated") and aborted the whole test job before any test ran.
env: env:
MONGODB_URI: mongodb://mongo:27017 MONGODB_URI: mongodb://mongo:27017
APP_ENVIRONMENT: development APP_ENVIRONMENT: development