mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-02-03 21:03:08 +00:00
fix: add OpenCode cache volume for version file persistence
OpenCode stores a version file in ~/.cache/opencode/ which was causing EACCES permission errors. This adds: - Volume mount for ~/.cache/opencode - Entrypoint script to set correct ownership/permissions on the cache directory
This commit is contained in:
@@ -90,6 +90,9 @@ services:
|
|||||||
# Persist OpenCode user configuration across container restarts
|
# Persist OpenCode user configuration across container restarts
|
||||||
- automaker-opencode-config:/home/automaker/.config/opencode
|
- automaker-opencode-config:/home/automaker/.config/opencode
|
||||||
|
|
||||||
|
# Persist OpenCode cache directory (contains version file and other cache data)
|
||||||
|
- automaker-opencode-cache:/home/automaker/.cache/opencode
|
||||||
|
|
||||||
# NO host directory mounts - container cannot access your laptop files
|
# NO host directory mounts - container cannot access your laptop files
|
||||||
# If you need to work on a project, create it INSIDE the container
|
# If you need to work on a project, create it INSIDE the container
|
||||||
# or use a separate docker-compose override file
|
# or use a separate docker-compose override file
|
||||||
@@ -123,3 +126,8 @@ volumes:
|
|||||||
name: automaker-opencode-config
|
name: automaker-opencode-config
|
||||||
# Named volume for OpenCode user configuration (~/.config/opencode)
|
# Named volume for OpenCode user configuration (~/.config/opencode)
|
||||||
# Persists user configuration across container restarts
|
# Persists user configuration across container restarts
|
||||||
|
|
||||||
|
automaker-opencode-cache:
|
||||||
|
name: automaker-opencode-cache
|
||||||
|
# Named volume for OpenCode cache directory (~/.cache/opencode)
|
||||||
|
# Contains version file and other cached data
|
||||||
|
|||||||
@@ -40,6 +40,13 @@ fi
|
|||||||
chown -R automaker:automaker /home/automaker/.config/opencode
|
chown -R automaker:automaker /home/automaker/.config/opencode
|
||||||
chmod -R 700 /home/automaker/.config/opencode
|
chmod -R 700 /home/automaker/.config/opencode
|
||||||
|
|
||||||
|
# OpenCode also uses ~/.cache/opencode for cache data (version file, etc.)
|
||||||
|
if [ ! -d "/home/automaker/.cache/opencode" ]; then
|
||||||
|
mkdir -p /home/automaker/.cache/opencode
|
||||||
|
fi
|
||||||
|
chown -R automaker:automaker /home/automaker/.cache/opencode
|
||||||
|
chmod -R 700 /home/automaker/.cache/opencode
|
||||||
|
|
||||||
# If CURSOR_AUTH_TOKEN is set, write it to the cursor auth file
|
# If CURSOR_AUTH_TOKEN is set, write it to the cursor auth file
|
||||||
# On Linux, cursor-agent uses ~/.config/cursor/auth.json for file-based credential storage
|
# On Linux, cursor-agent uses ~/.config/cursor/auth.json for file-based credential storage
|
||||||
# The env var CURSOR_AUTH_TOKEN is also checked directly by cursor-agent
|
# The env var CURSOR_AUTH_TOKEN is also checked directly by cursor-agent
|
||||||
|
|||||||
Reference in New Issue
Block a user