Files
workspace/.opencode-sandbox/docker-compose.yml
gabspereira 32e5eb8906 chore(opencode-sandbox): add SSH auth and workspace mount for Gitea
- Mount host workspace at /home/ga/workspace
- Add SSH key and known_hosts for Gitea auth
- Configure git user identity in container
2026-04-05 18:19:34 +00:00

27 lines
729 B
YAML

services:
opencode:
build:
context: .
dockerfile: Dockerfile
image: opencode-sandbox
container_name: opencode
cap_add:
- NET_ADMIN # required for iptables in entrypoint
- NET_RAW
volumes:
# Your monorepo — opencode's working directory
- /home/ga/workspace:/workspace
# SSH key for Gitea auth
- ~/.ssh/id_ed25519:/root/.ssh/id_ed25519:ro
- ~/.ssh/known_hosts:/root/.ssh/known_hosts:ro
# Persist opencode auth so you don't re-login every time
- opencode-auth:/root/.local/share/opencode
environment:
- OPENCODE_API_KEY=${OPENCODE_API_KEY}
stdin_open: true
tty: true
working_dir: /workspace
volumes:
opencode-auth: