You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Update README with persistent storage and configuration docs
- Add Persistent Storage section with volume mount instructions
- Document directory structure for config, auth, and .opencode directories
- Add comprehensive environment variables table
- Include config precedence order from OpenCode docs
- Update quickstart examples with current image reference
- Add building instructions
A ready‑to‑use Docker image that runs **`opencode serve`**, the headless HTTP server exposing an OpenAPI endpoint for Opencode clients.
4
-
The image is pre‑configured with an entrypoint that maps environment variables to the CLI flags, so you can control every server option (port, hostname, mDNS, CORS, authentication, …) without writing custom scripts.
3
+
A ready-to-use Docker image that runs **`opencode serve`**, the headless HTTP server exposing an OpenAPI endpoint for OpenCode clients.
4
+
The image is pre-configured with an entrypoint that maps environment variables to the CLI flags, so you can control every server option (port, hostname, mDNS, CORS, authentication, …) without writing custom scripts.
5
5
6
-
## 🚀 What the image does
6
+
## Features
7
7
8
-
| Feature | How it’s exposed |
8
+
| Feature | How it's exposed |
9
9
| ------- | ---------------- |
10
10
|**Port & Hostname**|`PORT` and `HOSTNAME_OVERRIDE` (defaults to `0.0.0.0` inside Docker) |
11
-
|**CORS origins**|`CORS` – comma‑separated list (e.g. `http://localhost:5173,https://app.example.com`) |
11
+
|**CORS origins**|`CORS` – comma-separated list (e.g. `http://localhost:5173,https://app.example.com`) |
12
12
|**mDNS discovery**|`MDNS=true` and optional `MDNS_DOMAIN`|
13
-
|**HTTP Basic Auth**|`OPENCODE_SERVER_USERNAME` (default = `opencode`) and `OPENCODE_SERVER_PASSWORD`|
13
+
|**HTTP Basic Auth**|`OPENCODE_SERVER_USERNAME` (default=`opencode`) and `OPENCODE_SERVER_PASSWORD`|
14
+
|**Config directory**|`OPENCODE_CONFIG_DIR` – path to config directory |
15
+
|**Custom config file**|`OPENCODE_CONFIG` – path to specific config file |
16
+
|**Inline config**|`OPENCODE_CONFIG_CONTENT` – JSON config content at runtime |
14
17
|**Automatic flag handling**| The entrypoint script builds the proper `opencode serve [flags]` command from the env vars |
15
-
|**CI / CD**| GitHub Actions workflow builds multi‑arch images (amd64 / arm64) and pushes them to GitHub Container Registry (GHCR) on every push to `main` or on version tags (`v*`). |
18
+
|**CI / CD**| GitHub Actions workflow builds multi-arch images (amd64/arm64) and pushes them to GitHub Container Registry (GHCR) on every push to `main` or on version tags (`v*`). |
16
19
17
-
## 📦 Quickstart (Docker CLI)
20
+
## Persistent Storage
21
+
22
+
The container supports persistent storage for configuration, credentials, and custom agents/commands.
23
+
24
+
### Volume Mount
25
+
26
+
Mount a host directory to `/root/.local/share/opencode` to persist data:
0 commit comments