opencode/compose.yaml aktualisiert

This commit is contained in:
thomas committed 2026-12-05 16:58:40 +00:00
1 parent 5a47f9fc7b
commit c6de7f48b1
1 file changed
+14 -2
+14 -2
View File
@@ -6,12 +6,24 @@ services:
restart: always
ports:
- "${HOST_PORT:-4096}:4096"
command: ["web", "--port", "4096", "--hostname", "0.0.0.0"]
entrypoint: ["/bin/sh", "-c"]
command:
- |
git config --global user.name "$$GIT_USER_NAME"
git config --global user.email "$$GIT_USER_EMAIL"
git config --global init.defaultBranch main
git config --global credential.helper store
GITEA_HOST=$$(echo "$$GITEA_URL" | sed -E 's|^https?://||; s|/+$$||')
GITEA_PROTO=$$(echo "$$GITEA_URL" | grep -oE '^https?')
echo "$${GITEA_PROTO}://oauth2:$${GITEA_TOKEN}@$${GITEA_HOST}" > ~/.git-credentials
chmod 600 ~/.git-credentials
exec opencode web --port 4096 --hostname 0.0.0.0
environment:
- OPENCODE_SERVER_PASSWORD=${OPENCODE_PASSWORD:?error_OPENCODE_PASSWORD_is_required}
- OPENCODE_SERVER_USERNAME=${OPENCODE_USERNAME:-opencode}
- GIT_USER_NAME=${GIT_USER_NAME:-OpenCode Agent}
- GIT_USER_EMAIL=${GIT_USER_EMAIL:-opencode-bot@local.internal}
- GITEA_URL=${GITEA_URL:?error_GITEA_URL_is_required}
- GITEA_TOKEN=${GITEA_PAT:?error_GITEA_PAT_is_required}
- GITHUB_TOKEN=${GITEA_PAT:-}
- LLAMA_BASE_URL=${LLAMA_BASE_URL:?error_LLAMA_BASE_URL_is_required}
@@ -25,7 +37,7 @@ services:
volumes:
- /opt/docker/${STACK_NAME:-opencode}/workspaces:/root/workspaces
- /opt/docker/${STACK_NAME:-opencode}/config:/root/.config/opencode
working_dir: /workspaces
working_dir: /root/workspaces
depends_on:
db:
condition: service_healthy