chore(input): align codex tooling docs

This commit is contained in:
2025-10-15 18:11:24 -05:00
parent 7ee188f270
commit b01b9fb413
5 changed files with 134 additions and 20 deletions

View File

@@ -17,5 +17,7 @@ services:
- ../ForCustomizing/failed:/workspace/failed
- ../resume:/workspace/resume:ro
- ../templates:/templates:ro
- ${CODEX_CONFIG_DIR:-/workspace/.codex}:/home/codex/.codex
- ${HOST_CODEX_DIR:-${HOME}/.codex}:/home/codex/.codex
- /etc/localtime:/etc/localtime:ro
- /etc/machine-id:/etc/machine-id:ro
- /var/lib/dbus/machine-id:/var/lib/dbus/machine-id:ro

View File

@@ -9,27 +9,20 @@ fi
if docker compose version >/dev/null 2>&1; then
COMPOSE_CMD=(docker compose)
elif command -v docker-compose >/dev/null 2>&1; then
elif command -dv docker-compose >/dev/null 2>&1; then
COMPOSE_CMD=(docker-compose)
else
echo "Error: docker compose plugin or docker-compose binary is required." >&2
exit 1
fi
CALLER_UID=$(id -u)
CALLER_GID=$(id -g)
DEFAULT_CODEX_CONFIG="${HOME}/.codex"
CODEX_CONFIG_DIR=${CODEX_CONFIG_DIR:-${DEFAULT_CODEX_CONFIG}}
mkdir -p "${CODEX_CONFIG_DIR}"
SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
HOST_CODEX_DIR=${HOST_CODEX_DIR:-${HOME}/.codex}
mkdir -p "${HOST_CODEX_DIR}"
(
cd "${SCRIPT_DIR}"
LOCAL_UID="${CALLER_UID}" \
LOCAL_GID="${CALLER_GID}" \
CODEX_CONFIG_DIR="${CODEX_CONFIG_DIR}" \
HOST_CODEX_DIR="${HOST_CODEX_DIR}" \
"${COMPOSE_CMD[@]}" "$@"
)