add docker compose.yml, env example and gitignore file

This commit is contained in:
tao.chen
2026-06-18 14:34:03 +08:00
parent b499f5fb34
commit ad83c2626b
3 changed files with 60 additions and 0 deletions
+27
View File
@@ -0,0 +1,27 @@
services:
opencode:
container_name: opencode
build: .
image: opencode:latest
ports:
- "14096:4096"
environment:
# Set OPENCODE_SERVER_PASSWORD in .env or your shell environment before `docker compose up`.
OPENCODE_SERVER_PASSWORD: ${OPENCODE_SERVER_PASSWORD}
volumes:
- /root/.config/opencode:/root/.config/opencode
- /root/.local/share/opencode:/root/.local/share/opencode
- /root/OpenCode:/root/workspace
command:
- web
- --hostname
- 0.0.0.0
- --mdns
- --port
- "4096"
- --print-logs
- --log-level
- DEBUG
tty: true
stdin_open: true
restart: unless-stopped