fix: use host bind mount for repos so tool instances can access workspace files
Replace named Docker volume (repo_data) with bind mount (/data/repos) in both development and production compose files. The named volume trapped repo files inside the API container; tool instances started via Docker socket on the host could not see them, causing /workspace to mount as an empty directory. Also fix 6 pre-existing test failures in test_tool_instances_legacy.py caused by get_container_id/get_container_name moving to docker.py and new helpers (_ensure_web_bind_address, _ensure_container_name_in_compose) being added. - docker-compose.yml: repo_data:/data/repos -> /data/repos:/data/repos - docker-compose.traefik.yml: same change + remove repo_data volume decl - tests: update patch targets and add missing mock parameters Quality gates: pytest test_tool_instances_legacy.py (10 passed)
This commit is contained in:
+7
-4
@@ -1,4 +1,4 @@
|
||||
version: '3.8'
|
||||
version: "3.8"
|
||||
|
||||
services:
|
||||
# PostgreSQL Database
|
||||
@@ -14,7 +14,11 @@ services:
|
||||
ports:
|
||||
- "5432:5432"
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-headquarter} -d ${POSTGRES_DB:-headquarter}"]
|
||||
test:
|
||||
[
|
||||
"CMD-SHELL",
|
||||
"pg_isready -U ${POSTGRES_USER:-headquarter} -d ${POSTGRES_DB:-headquarter}",
|
||||
]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
@@ -57,7 +61,7 @@ services:
|
||||
REPO_BASE_PATH: /data/repos
|
||||
INSTANCE_BASE_PATH: /data/instances
|
||||
volumes:
|
||||
- repo_data:/data/repos
|
||||
- /data/repos:/data/repos
|
||||
- /data/instances:/data/instances
|
||||
ports:
|
||||
- "8000:8000"
|
||||
@@ -91,7 +95,6 @@ services:
|
||||
volumes:
|
||||
postgres_data:
|
||||
redis_data:
|
||||
repo_data:
|
||||
|
||||
networks:
|
||||
backend:
|
||||
|
||||
Reference in New Issue
Block a user