Conversation
built with Refined Cloudflare Pages Action⚡ Cloudflare Pages Deployment
|
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds an OpenCode template: a self-hosted, password-protected web UI for the open-source AI coding agent.
How it works
ghcr.io/anomalyco/opencode:1.18.32(no custom image).gitnor a toolchain, so it is provisioned on start-up viaapkand is configurable withTOOLCHAIN_PACKAGES(set to""to disable; defaultgit nodejs npm python3).GIT_REPO_URL(andGIT_TOKENfor private repos) and the repo is cloned into/workspace. The token is written to/root/.git-credentials(credential.helper store), so the git remote URL stays clean.https = true.Tested
Deployed from this branch on a Dokploy instance:
opencode servelistens on0.0.0.0:4096;apk add $TOOLCHAIN_PACKAGESinstalls git/nodejs/npm/python3;serviceName: opencode, port 4096): 401 without auth, OpenCode UI with the generated password;Same validators as CI run locally and pass:
generate-meta.js --check,validate-docker-compose.ts,validate-template.ts.Note
The start-up
apk addis required because the upstream image does not shipgit(see anomalyco/opencode#27743). Ifgit(and optionally node/python) lands in the official image, this template can be reduced to the image +opencode serve.Known limitation
The built-in web terminal (
Toggle terminal,Ctrl+\``) does not start on the official Alpine image. The image ships the musl build, but the bundled PTY native library is glibc-linked, soPOST /api/pty` fails with:Reproduced with
ghcr.io/anomalyco/opencode:1.18.32(Alpine, musl). The rest of the web UI works normally (chat, file edits, commands run through the agent). A glibc base (Debian) with theopencode-linux-x64.tar.gzrelease binary starts the PTY and runs a shell correctly. This is an upstream image issue, not specific to this template.