Update .env for new server and agent image versions; enhance docker-compose.yml with dynamic agent names and extra hosts; add troubleshooting guide for port allocation issues.

This commit is contained in:
2026-06-09 11:00:18 +02:00
parent ccd36b14f3
commit e0c6f31a36
3 changed files with 50 additions and 2 deletions

6
.env
View File

@@ -1 +1,5 @@
AGENT_IMAGE_VERSION="2025.07.3-linux-sudo"
SERVER_IMAGE_VERSION="2026.1.1-linux"
AGENT_IMAGE_VERSION="2026.1.1-linux-sudo"
AGENT_NAME_1="master-agent"
AGENT_NAME_2="bbc-agent"
AGENT_NAME_3="dev-test-agent"

32
TROUBLESHOOTING.md Normal file
View File

@@ -0,0 +1,32 @@
# Troubleshooting
## Port 55432 Already Allocated (E2E Builds)
**Symptom:**
A build step like "Postgres Up" fails with:
```
Bind for 0.0.0.0:55432 failed: port is already allocated
```
**Cause:**
A Postgres container from a previous build was not cleaned up properly (e.g. build failed before reaching its teardown step). Since all E2E builds use the same hardcoded host port `55432`, the stale container blocks any new build from starting.
**Diagnosis:**
```bash
# Find what's holding the port
docker ps --filter "publish=55432" --format "table {{.Names}}\t{{.Status}}\t{{.Ports}}"
```
**Fix:**
```bash
# Remove the stale container (replace the name with the one from the command above)
docker rm -f <container-name>
```
Then re-run the failed build.
**Prevention:**
Ensure every build configuration runs `docker compose down -v` in a cleanup/always-run step so containers are torn down even when earlier steps fail.

View File

@@ -15,7 +15,7 @@ services:
- '/teamcity/logs:/opt/teamcity/logs'
networks:
- devops
image: jetbrains/teamcity-server
image: jetbrains/teamcity-server:${SERVER_IMAGE_VERSION}
teamcity-agent-1:
restart: always
@@ -23,10 +23,14 @@ services:
environment:
- 'SERVER_URL=teamcity-server:8111'
- DOCKER_IN_DOCKER=start
- AGENT_NAME=${AGENT_NAME_1}
user: root
privileged: true
networks:
- devops
extra_hosts:
- "host.docker.internal:host-gateway"
- "phoenixDBE2E:host-gateway"
volumes:
- '/teamcity/agent:/teamcity_agent/conf'
- '/var/run/docker.sock:/var/run/docker.sock'
@@ -42,10 +46,14 @@ services:
environment:
- 'SERVER_URL=teamcity-server:8111'
- DOCKER_IN_DOCKER=start
- AGENT_NAME=${AGENT_NAME_2}
user: root
privileged: true
networks:
- devops
extra_hosts:
- "host.docker.internal:host-gateway"
- "phoenixDBE2E:host-gateway"
volumes:
- '/teamcity/agent2:/teamcity_agent/conf'
- '/var/run/docker.sock:/var/run/docker.sock'
@@ -62,10 +70,14 @@ services:
environment:
- 'SERVER_URL=teamcity-server:8111'
- DOCKER_IN_DOCKER=start
- AGENT_NAME=${AGENT_NAME_3}
user: root
privileged: true
networks:
- devops
extra_hosts:
- "host.docker.internal:host-gateway"
- "phoenixDBE2E:host-gateway"
volumes:
- '/teamcity/agent3:/teamcity_agent/conf'
- '/var/run/docker.sock:/var/run/docker.sock'