69 lines
2.2 KiB
YAML
69 lines
2.2 KiB
YAML
# opencode-devbox docker-compose
|
|
#
|
|
# Usage:
|
|
# cp .env.example .env # configure your provider and keys
|
|
# docker compose up -d
|
|
# docker compose exec -u developer devbox opencode
|
|
#
|
|
# Or for interactive one-shot:
|
|
# docker compose run --rm devbox
|
|
|
|
services:
|
|
devbox:
|
|
build:
|
|
context: .
|
|
args:
|
|
INSTALL_PYTHON: "false"
|
|
INSTALL_GO: "false"
|
|
INSTALL_OMOS: "false"
|
|
image: opencode-devbox:latest
|
|
container_name: opencode-devbox
|
|
stdin_open: true
|
|
tty: true
|
|
env_file:
|
|
- .env
|
|
environment:
|
|
- TERM=xterm-256color
|
|
volumes:
|
|
# Host workspace — mount your project here
|
|
- ${WORKSPACE_PATH:-.}:/workspace
|
|
|
|
# SSH keys (read-only) — for git push/pull
|
|
- ${SSH_KEY_PATH:-~/.ssh}:/home/developer/.ssh:ro
|
|
|
|
# Optional: mount opencode config directory (persists config changes across restarts)
|
|
# Includes opencode.json, oh-my-opencode-slim.json, skills, etc.
|
|
# When mounted, OPENCODE_PROVIDER auto-config is skipped if opencode.json exists.
|
|
# - ~/.config/opencode:/home/developer/.config/opencode
|
|
|
|
# Optional: mount opencode agent skills from host
|
|
# - ~/.agents/skills:/home/developer/.agents/skills:ro
|
|
|
|
# Optional: mount neovim config from host (plugins auto-install on first start)
|
|
# - ~/.config/nvim:/home/developer/.config/nvim:ro
|
|
|
|
# Optional: persist opencode data (auth, memory, etc.)
|
|
- devbox-data:/home/developer/.local/share/opencode
|
|
|
|
# Optional: persist uv data (Python installs, tool installs)
|
|
# Without this, 'uv python install' must be re-run after container removal.
|
|
- devbox-uv:/home/developer/.local/share/uv
|
|
|
|
# Optional: persist Rust toolchains and cargo data
|
|
# Without this, 'rustup-init' must be re-run after container removal.
|
|
# - devbox-rustup:/home/developer/.rustup
|
|
# - devbox-cargo:/home/developer/.cargo
|
|
|
|
# Optional: persist VS Code server and extensions across container recreations
|
|
# - devbox-vscode:/home/developer/.vscode-server
|
|
|
|
# Optional: AWS credentials/SSO config (not read-only — SSO writes token cache)
|
|
# - ~/.aws:/home/developer/.aws
|
|
|
|
volumes:
|
|
devbox-data:
|
|
devbox-uv:
|
|
# devbox-rustup:
|
|
# devbox-cargo:
|
|
# devbox-vscode:
|