fix(docker): use PICOCLAW_HOME env var for volume paths in docker-compose.full.yml (#2269)
The docker-compose.full.yml had hardcoded /root/.picoclaw paths for volumes. This caused issues when running containers with non-root users or custom home directories. Changes: - Add PICOCLAW_HOME environment variable support (defaults to /root/.picoclaw) - Use variable substitution in volume mounts for config.json and workspace - Applied to both picoclaw-agent and picoclaw-gateway services This allows users to override the home directory by setting PICOCLAW_HOME environment variable before running docker compose.
This commit is contained in:
parent
f0e6b7aa37
commit
91b4a2a44b
1 changed files with 10 additions and 4 deletions
|
|
@ -10,9 +10,12 @@ services:
|
||||||
container_name: picoclaw-agent-full
|
container_name: picoclaw-agent-full
|
||||||
profiles:
|
profiles:
|
||||||
- agent
|
- agent
|
||||||
|
environment:
|
||||||
|
# Allow overriding the default home directory via environment variable
|
||||||
|
- PICOCLAW_HOME=${PICOCLAW_HOME:-/root/.picoclaw}
|
||||||
volumes:
|
volumes:
|
||||||
- ../config/config.json:/root/.picoclaw/config.json:ro
|
- ../config/config.json:${PICOCLAW_HOME:-/root/.picoclaw}/config.json:ro
|
||||||
- picoclaw-workspace:/root/.picoclaw/workspace
|
- picoclaw-workspace:${PICOCLAW_HOME:-/root/.picoclaw}/workspace
|
||||||
- picoclaw-npm-cache:/root/.npm # npm cache for faster MCP server installs
|
- picoclaw-npm-cache:/root/.npm # npm cache for faster MCP server installs
|
||||||
entrypoint: ["picoclaw", "agent"]
|
entrypoint: ["picoclaw", "agent"]
|
||||||
stdin_open: true
|
stdin_open: true
|
||||||
|
|
@ -30,11 +33,14 @@ services:
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
profiles:
|
profiles:
|
||||||
- gateway
|
- gateway
|
||||||
|
environment:
|
||||||
|
# Allow overriding the default home directory via environment variable
|
||||||
|
- PICOCLAW_HOME=${PICOCLAW_HOME:-/root/.picoclaw}
|
||||||
volumes:
|
volumes:
|
||||||
# Configuration file
|
# Configuration file
|
||||||
- ../config/config.json:/root/.picoclaw/config.json:ro
|
- ../config/config.json:${PICOCLAW_HOME:-/root/.picoclaw}/config.json:ro
|
||||||
# Persistent workspace (sessions, memory, logs)
|
# Persistent workspace (sessions, memory, logs)
|
||||||
- picoclaw-workspace:/root/.picoclaw/workspace
|
- picoclaw-workspace:${PICOCLAW_HOME:-/root/.picoclaw}/workspace
|
||||||
# NPM cache for faster MCP server installs
|
# NPM cache for faster MCP server installs
|
||||||
- picoclaw-npm-cache:/root/.npm
|
- picoclaw-npm-cache:/root/.npm
|
||||||
command: ["gateway"]
|
command: ["gateway"]
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue