fix: review feedback — cd path in release.sh, compose file access in edge container
- formulas/release.sh: cd to $FACTORY_ROOT (not parent) for docker compose build - docker-compose.yml: mount docker-compose.yml into edge container, pass HOST_PROJECT_DIR - dispatcher.sh: use -f and --project-directory so compose resolves volume paths against the host filesystem when invoked from inside the edge container Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
3c8b61168d
commit
fbf1a6dcc2
3 changed files with 10 additions and 2 deletions
|
|
@ -116,6 +116,7 @@ services:
|
||||||
- ${HOME}/.claude.json:/root/.claude.json:ro
|
- ${HOME}/.claude.json:/root/.claude.json:ro
|
||||||
- ${HOME}/.claude:/root/.claude:ro
|
- ${HOME}/.claude:/root/.claude:ro
|
||||||
- disinto-logs:/opt/disinto-logs
|
- disinto-logs:/opt/disinto-logs
|
||||||
|
- ./docker-compose.yml:/opt/docker-compose.yml:ro
|
||||||
environment:
|
environment:
|
||||||
- FORGE_SUPERVISOR_TOKEN=${FORGE_SUPERVISOR_TOKEN:-}
|
- FORGE_SUPERVISOR_TOKEN=${FORGE_SUPERVISOR_TOKEN:-}
|
||||||
- ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY:-}
|
- ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY:-}
|
||||||
|
|
@ -123,6 +124,7 @@ services:
|
||||||
- FORGE_TOKEN=${FORGE_TOKEN:-}
|
- FORGE_TOKEN=${FORGE_TOKEN:-}
|
||||||
- FORGE_URL=http://forgejo:3000
|
- FORGE_URL=http://forgejo:3000
|
||||||
- DISINTO_CONTAINER=1
|
- DISINTO_CONTAINER=1
|
||||||
|
- HOST_PROJECT_DIR=${HOST_PROJECT_DIR:-.}
|
||||||
ports:
|
ports:
|
||||||
- "80:80"
|
- "80:80"
|
||||||
- "443:443"
|
- "443:443"
|
||||||
|
|
|
||||||
|
|
@ -411,7 +411,13 @@ launch_runner() {
|
||||||
# Build docker compose run command (delegates to compose runner service)
|
# Build docker compose run command (delegates to compose runner service)
|
||||||
# The runner service definition handles image, network, volumes, and base env.
|
# The runner service definition handles image, network, volumes, and base env.
|
||||||
# The dispatcher only adds declared secrets and the ops repo mount.
|
# The dispatcher only adds declared secrets and the ops repo mount.
|
||||||
local -a cmd=(docker compose run --rm)
|
#
|
||||||
|
# The edge container has docker-compose.yml mounted at /opt/docker-compose.yml.
|
||||||
|
# --project-directory tells docker compose to resolve relative paths (volumes,
|
||||||
|
# env_file) against the HOST project root so the Docker daemon finds them.
|
||||||
|
local compose_file="${COMPOSE_FILE:-/opt/docker-compose.yml}"
|
||||||
|
local project_dir="${HOST_PROJECT_DIR:-.}"
|
||||||
|
local -a cmd=(docker compose -f "$compose_file" --project-directory "$project_dir" run --rm)
|
||||||
|
|
||||||
# Add environment variables for secrets (if any declared)
|
# Add environment variables for secrets (if any declared)
|
||||||
if [ -n "$secrets_array" ]; then
|
if [ -n "$secrets_array" ]; then
|
||||||
|
|
|
||||||
|
|
@ -163,7 +163,7 @@ fi
|
||||||
|
|
||||||
log "Step 4/6: Building agents Docker image"
|
log "Step 4/6: Building agents Docker image"
|
||||||
|
|
||||||
cd "$FACTORY_ROOT/.." || exit 1
|
cd "$FACTORY_ROOT" || exit 1
|
||||||
docker compose build --no-cache agents 2>&1 | tail -5
|
docker compose build --no-cache agents 2>&1 | tail -5
|
||||||
log "Image built"
|
log "Image built"
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue