{"id":51631233,"url":"https://github.com/mcaimi/opencode-web-ocp","last_synced_at":"2026-07-13T07:30:53.672Z","repository":{"id":364088609,"uuid":"1265224391","full_name":"mcaimi/opencode-web-ocp","owner":"mcaimi","description":"Simple OpenCode Web on OCP ","archived":false,"fork":false,"pushed_at":"2026-06-11T15:46:28.000Z","size":47,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-11T16:23:50.026Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://codeberg.org/mcaimi/opencode-web-ocp","language":"Dockerfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mcaimi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2026-06-10T15:21:21.000Z","updated_at":"2026-06-11T15:46:46.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/mcaimi/opencode-web-ocp","commit_stats":null,"previous_names":["mcaimi/opencode-web-ocp"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/mcaimi/opencode-web-ocp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcaimi%2Fopencode-web-ocp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcaimi%2Fopencode-web-ocp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcaimi%2Fopencode-web-ocp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcaimi%2Fopencode-web-ocp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mcaimi","download_url":"https://codeload.github.com/mcaimi/opencode-web-ocp/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcaimi%2Fopencode-web-ocp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35414732,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-13T02:00:06.543Z","response_time":119,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-07-13T07:30:53.585Z","updated_at":"2026-07-13T07:30:53.666Z","avatar_url":"https://github.com/mcaimi.png","language":"Dockerfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# opencode-web-ocp\n\n[![Docker Repository on Quay](https://quay.io/repository/marcocaimi/opencode-web-ocp/status \"Docker Repository on Quay\")](https://quay.io/repository/marcocaimi/opencode-web-ocp)\n\nDeploy [opencode web](https://github.com/anomalyco/opencode) as a containerized web service on OpenShift.\n\n`opencode` is an AI-powered IDE-like terminal interface. This project wraps it for OpenShift deployment, connecting to an OpenShift-hosted LLM inference endpoint.\n\n## Project structure\n\n| File/Directory | Purpose |\n|---|---|\n| `Containerfile` | Multi-stage image build — downloads the opencode binary (v1.17.4) for multiple architectures, packages into UBI minimal. Downloads the code-security skill from GitHub. Home dir is `/home/opencode`. User runs as `opencode` (uid arbitrary, gid 0 for OpenShift compatibility) |\n| `scripts/entry.sh` | Entrypoint script (installed as `/usr/local/bin/entrypoint`) — substitutes env vars into the opencode config, displays proxy settings, then launches `opencode serve` |\n| `config/opencode.json` | OpenCode config (points to OpenShift LLM via `@ai-sdk/openai-compatible` adapter), placed in `/home/opencode/.config/opencode/` |\n| `agents/` | Custom opencode subagents (`git-summary.md`, `security-auditor.md`) placed in `/home/opencode/.config/opencode/agents/` |\n| `helm/` | Helm chart for OpenShift deployment with proxy support, persistent storage, and edge-terminated routes |\n\n## How runtime config works\n\nAt container start, `entry.sh` uses `jq` to replace the placeholder key `OPENSHIFT_DEPLOYED_MODEL_NAME` in `opencode.json` with the value of the `MODEL_NAME` env var.\n\n**Never edit `opencode.json` directly.** The placeholder is substituted at runtime from environment variables.\n\n## Build\n\nBuild the container image:\n\n```bash\npodman build -t opencode-web-ocp -f Containerfile .\n```\n\n## Run\n\n### Local testing (podman)\n\n```bash\npodman run -p 8080:8080 \\\n  -e INFERENCE_ENDPOINT=http://your-llm-endpoint \\\n  -e MODEL_NAME=qwen-coder \\\n  opencode-web-ocp\n```\n\n### Deploy on OpenShift\n\nFirst, get the inference service URL:\n\n```bash\nINFERENCE_URL=$(oc get inferenceservice qwen3-coder -o jsonpath=\"{.status.url}\")\n```\n\n#### 3-step deploy (recommended)\n\n```bash\noc new-app --name=opencode-web-ocp\noc env dc/opencode-web-ocp \\\n  INFERENCE_ENDPOINT=$INFERENCE_URL \\\n  MODEL_NAME=qwen-coder \\\n  SERVER_PASSWORD=yourpassword\noc create route edge --service=opencode-web-ocp --insecure-policy=Redirect\n```\n\n#### One-liner deploy\n\nBuilds from the local Containerfile, injects env vars, and creates the route:\n\n```bash\nINFERENCE_URL=$(oc get inferenceservice qwen3-coder -o jsonpath=\"{.status.url}\") \u0026\u0026 \\\n\n# import image or build it yourself\noc import-image quay.io/marcocaimi/opencode-web-ocp:latest\n\noc new-app -i opencode-web-ocp --name=opencode-web-ocp \\\n  -e INFERENCE_ENDPOINT=$INFERENCE_URL \\\n  -e MODEL_NAME=qwen-coder \\\n  \u0026\u0026 oc create route edge --service=opencode-web-ocp --insecure-policy=Redirect\n```\n\n## Configuration\n\n| Environment Variable | Default | Description |\n|---|---|---|\n| `INFERENCE_ENDPOINT` | `http://inference.apps.openshift.local` | LLM API base URL |\n| `MODEL_NAME` | `qwen-coder` | Model name to use in `opencode.json` |\n| `SERVER_PASSWORD` | `redhat` | OpenCode web UI password |\n| `OPENCODE_AUTOUPDATE` | `true` | Enable/disable auto-update |\n| `APIKEY` | (empty) | OpenShift vLLM API key (maps to `OPENSHIFT_AI_VLLM_API_KEY`) |\n| `CONFIG_FILE` | `/home/opencode/.config/opencode/opencode.json` | Path to opencode config file |\n| `HOST` | local IP / `localhost` | Bind address (auto-resolved from `hostname -i`) |\n| `PORT` | `8080` | Listen port |\n| `HTTP_PROXY` | (unset) | HTTP proxy URL (displayed at startup) |\n| `HTTPS_PROXY` | (unset) | HTTPS proxy URL (displayed at startup) |\n| `NO_PROXY` | (unset) | Comma-separated list of domains to exclude from proxy |\n\n## Helm Chart Deployment\n\nA complete Helm chart is available in the `helm/` directory with support for:\n\n- Dedicated ServiceAccount (`opencode-sa`)\n- Optional PersistentVolumeClaim for `/workspace`\n- Edge-terminated OpenShift Route with customizable hostname\n- **HTTP/HTTPS proxy support** with automatic Kubernetes/OpenShift NO_PROXY exclusions\n- Configurable resources, replicas, health checks\n- API key support via `APIKEY` env var\n\nSee [helm/README.md](helm/README.md) for installation instructions and [helm/PROXY-EXAMPLES.md](helm/PROXY-EXAMPLES.md) for proxy configuration scenarios.\n\n### Quick Helm Install\n\n```bash\n# Basic installation\nhelm install opencode-web ./helm \\\n  --set route.hostname=opencode.apps.your-cluster.com\n\n# With inference endpoint and API key\nhelm install opencode-web ./helm \\\n  --set route.hostname=opencode.apps.your-cluster.com \\\n  --set env[0].name=INFERENCE_ENDPOINT \\\n  --set env[0].value=http://your-inference-endpoint \\\n  --set env[1].name=MODEL_NAME \\\n  --set env[1].value=qwen-coder \\\n  --set env[2].name=APIKEY \\\n  --set env[2].value=your-api-key\n\n# With proxy support\nhelm install opencode-web ./helm \\\n  --set route.hostname=opencode.apps.your-cluster.com \\\n  --set proxy.enabled=true \\\n  --set proxy.httpProxy=http://proxy.corp.example.com:8080 \\\n  --set proxy.httpsProxy=http://proxy.corp.example.com:8080\n```\n\n## Gotchas\n\n- `opencode.json` uses placeholder values that are replaced at container start by `entry.sh`\n- Container runs as unprivileged user `opencode` (uid arbitrary, gid 0 for OpenShift)\n- The entrypoint script displays proxy settings (HTTP_PROXY, HTTPS_PROXY, NO_PROXY) at startup for troubleshooting\n- Custom subagents in `agents/` directory are automatically placed in `/home/opencode/.config/opencode/agents/`\n- No additional packages can be installed at runtime (runs as non-root)\n- The `code-security` skill is pre-installed from the semgrep/skills repo at image build time\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmcaimi%2Fopencode-web-ocp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmcaimi%2Fopencode-web-ocp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmcaimi%2Fopencode-web-ocp/lists"}