소스 정보
- 저장소
- lukemcqueen/hermes-cortex
- 최근 소스 활동
- 2026년 8월 25일 00:37
- 감지된 SKILL.md 언어
- 영어
- 스타
- 4
- 포크
- 1
설치 방법
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
소스 파일 검토
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
메뉴
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
직접 명령은 검토 Prompt를 거치지 않습니다. 실행하기 전에 소스를 확인하세요.
npx skills add https://github.com/lukemcqueen/hermes-cortex --skill docker-test-isolation-harness명령은 한 줄로 유지됩니다. 복사하기 전에 가로로 스크롤해 전체 내용을 확인하세요.
로컬 사본을 원하시나요? SkillsMP에서 현재 제공할 수 있는 파일을 다운로드하세요.
SKILL.md 표시 중
| name | docker-test-isolation-harness |
| description | Isolated throwaway containers for Docker test runs. |
| category | devops |
| version | 1.0.0 |
| platforms | ["linux","macos"] |
Run a Docker-based project's integration test suite WITHOUT bringing up its full compose stack on a shared host where that stack would collide with other running services. Uses isolated throwaway containers with unique names/ports, then tears them down.
Trigger when the project's stack can't come up safely on the host, yet the suite needs a real Postgres/Redis:
container_name: postgres / redis that collide with another
project's already-running containers of the same name — running yours would attach to or
disturb the wrong project's DB.docker ps)..venv with pytest + alembic installed (or the equivalent runner).# Which project owns the running 'postgres'? Read the compose-project label.
docker inspect postgres --format \
'project={{index .Config.Labels "com.docker.compose.project"}} \
workdir={{index .Config.Labels "com.docker.compose.project.working_dir"}}'
docker ps --format '{{.Names}}\t{{.Status}}\t{{.Ports}}' # non-default port maps reveal a sibling
A postgres on 13211->5432 is not your project's default 5432 — it belongs to someone else.
# 1. Throwaway Postgres + Redis with UNIQUE names and free ports.
docker run -d --name <proj>-test-pg -e POSTGRES_USER=<user> -e POSTGRES_PASSWORD=<pw> \
-e POSTGRES_DB=<db> -p 127.0.0.1:<p1>:5432 postgres:16-alpine
docker run -d --name <proj>-test-redis -p 127.0.0.1:<p2>:6379 redis:7-alpine
# wait for readiness: for i in $(seq 1 30); do \
# docker exec <proj>-test-pg pg_isready -U <user> >/dev/null 2>&1 && break; sleep 1; done
# 2. Point the app/tests at them via env. Env overrides .env in pydantic-settings.
export DATABASE_URL="postgresql://<user>:<pw>@127.0.0.1:<p1>/<db>"
export REDIS_URL="redis://127.0.0.1:<p2>/0"
# 3. Alembic reads sqlalchemy.url from alembic.ini, NOT env -> throwaway ini via -c.
# env.py's sys.path insert is anchored to env.py location, so -c from /tmp still imports the project.
# [alembic] script_location = <abs>/.../migrations ; sqlalchemy.url = postgresql://<user>:<pw>@127.0.0.1:<p1>/<db>
.venv/bin/python -m alembic -c /tmp/<proj>-test-alembic.ini upgrade head
# 4. Run the suite. The test harness spawns its own server subprocess -> inherits the env.
DATABASE_URL=... REDIS_URL=... .venv/bin/python -m pytest tests/ -q
# 5. Teardown AND confirm the sibling project is still up.
docker rm -f <proj>-test-pg <proj>-test-redis && rm -f /tmp/<proj>-test-alembic.ini
docker ps --format '{{.Names}}' | grep -E '^(postgres|redis|worker)$' # sibling set present
create_engine wants postgresql://
(psycopg2), NOT postgresql+asyncpg. Match the project's database.py / config default../run: the suite's spawned subprocess inherits YOUR
exported env; a ./run wrapper may source .env and clobber the override.nc -z 127.0.0.1 <port> before docker run -p.-test- containers clutter the host and can be mistaken
for the real stack.container_name: postgres/redis across projects) and its
permanent fix (unique container names per project) is covered in the engineering-approach skill.api/ gitignore silently dropping an app dir
from git — is in git-forensics / git-pull-local-changes.