opencode-config/docker-compose.yml
Sergey 2b9ee23b49
feat(memory): add memory-setup tool with deterministic init (#36)
* feat(memory): add memory-setup tool and rewrite script

* fix(memory): correct OPENCODE_MEMORY_DIR in docker-compose

* test(memory): add setup-memory tests with mock remote

* docs(memory): add ADR and handoff

* docs(handoff): set PR number

* fix(docs): correct handoff and ADR filenames to PR number

* docs: update project map + handoff + ADR

* fix(memory): address code review comments

---------

Co-authored-by: opencode-agent <agent@slaid098.dev>
2026-07-24 03:26:16 +03:00

63 lines
No EOL
1.6 KiB
YAML

services:
dind:
image: docker:dind
container_name: opencode-docker-dind
privileged: true
environment:
- DOCKER_TLS_CERTDIR=
networks:
- opencode_network
restart: unless-stopped
deploy:
resources:
limits:
cpus: '2'
memory: 4G
pids: 512
reservations:
memory: 1G
opencode:
build:
context: .
dockerfile: Dockerfile
container_name: opencode
restart: unless-stopped
command: ["serve", "--hostname", "0.0.0.0", "--port", "4096", "--cors", "*"]
working_dir: /root/workspace
env_file:
- .env
environment:
- DOCKER_HOST=tcp://docker-dind:2375
- OPENCODE_CONFIG_DIR=/root/.config/opencode
- OPENCODE_MEMORY_DIR=/root/.local/share/opencode/opencode-memory
- DOCKER_CONTAINER=true
- GIT_AUTHOR_NAME=opencode-agent
- GIT_AUTHOR_EMAIL=agent@opencode.local
- GIT_COMMITTER_NAME=opencode-agent
- GIT_COMMITTER_EMAIL=agent@opencode.local
volumes:
- ./.opencode:/root/.config/opencode
- ./AGENTS.md:/root/.config/opencode/AGENTS.md:ro
- ./app_data:/root/.local/share/opencode
- ./app_data/workspaces:/root/workspace
- ./app_data/ssh:/root/.ssh:ro
ports:
- "127.0.0.1:4096:4096"
networks:
- opencode_network
depends_on:
dind:
condition: service_started
deploy:
resources:
limits:
cpus: '3'
memory: 6G
pids: 1024
reservations:
memory: 2G
networks:
opencode_network:
name: opencode_network