add docker compose.yml, env example and gitignore file
This commit is contained in:
@@ -0,0 +1,5 @@
|
|||||||
|
# OpenCode 服务环境变量模板
|
||||||
|
# 复制本文件为 .env 并填入真实值;.env 不要提交到仓库。
|
||||||
|
|
||||||
|
# Web 服务登录密码。生产环境必须改为强密码并通过 secret manager 注入。
|
||||||
|
OPENCODE_SERVER_PASSWORD=change-me
|
||||||
+28
@@ -0,0 +1,28 @@
|
|||||||
|
# Environment / secrets — never commit real env files
|
||||||
|
.env
|
||||||
|
.env.local
|
||||||
|
.env.*.local
|
||||||
|
|
||||||
|
# Python
|
||||||
|
__pycache__/
|
||||||
|
*.py[cod]
|
||||||
|
*$py.class
|
||||||
|
*.so
|
||||||
|
.Python
|
||||||
|
.venv/
|
||||||
|
venv/
|
||||||
|
ENV/
|
||||||
|
|
||||||
|
# Editor / IDE
|
||||||
|
.vscode/
|
||||||
|
.idea/
|
||||||
|
*.swp
|
||||||
|
*.swo
|
||||||
|
|
||||||
|
# OS
|
||||||
|
.DS_Store
|
||||||
|
Thumbs.db
|
||||||
|
|
||||||
|
# Logs
|
||||||
|
*.log
|
||||||
|
logs/
|
||||||
@@ -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
|
||||||
Reference in New Issue
Block a user