From aa115e6e738e7e9c242ec450dd9f97cf72e77115 Mon Sep 17 00:00:00 2001 From: goose Date: Sat, 18 Jul 2026 21:02:46 -0300 Subject: [PATCH] ci: drop host port mapping for Mongo service container MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The test job failed on the runner with: Bind for 0.0.0.0:27017 failed: port is already allocated because the services.mongo ports: 27017:27017 tries to claim host port 27017, which is occupied (mongod on the runner host). The job container doesn't need the host mapping — it reaches Mongo over the job's internal network via the service hostname (MONGODB_URI=mongodb://mongo:27017). Drop the ports block so the service container schedules cleanly. This unblocks all PRs, including #6 (Phase A1). --- .forgejo/workflows/lint-and-build.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.forgejo/workflows/lint-and-build.yml b/.forgejo/workflows/lint-and-build.yml index 61e15be..ea85199 100644 --- a/.forgejo/workflows/lint-and-build.yml +++ b/.forgejo/workflows/lint-and-build.yml @@ -111,8 +111,12 @@ jobs: image: mongo:7 env: MONGO_INITDB_DATABASE: normogen_test - ports: - - 27017:27017 + # No `ports:` mapping: the job container reaches Mongo over the job's + # 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: MONGODB_URI: mongodb://mongo:27017 APP_ENVIRONMENT: development