Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,10 @@ One subcontainer, `opencode-sub`, runs the server. The image's entrypoint is the

The package declares two volumes.

| Volume | Mount point | Contents |
| --------- | -------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ |
| `main` | `/root` (read-write) | The container's entire home: sessions, credentials, repositories, projects, and OpenCode's own config, state, and cache. |
| `startos` | optional read-only `provider-trust/` subtree | StartOS-side state: `store.json`, holding the generated login password and the configured providers' API keys. |
| Volume | Mount point | Contents |
| --------- | ---------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `main` | `/root` (read-write) | The container's entire home: sessions, credentials, repositories, projects, and OpenCode's own config, state, and cache. |
| `startos` | `/etc/opencode-trust` (read-only, `provider-trust/` only, while a CA is set) | StartOS-side state: `store.json`, holding the generated login password and the configured providers' API keys, and the optional `provider-trust/ca.pem`. |

`main` is mounted over the image's home directory, so everything OpenCode writes
under `/root` persists across restarts and updates:
Expand Down Expand Up @@ -283,20 +283,23 @@ architectures: [x86_64, aarch64]
subcontainers: [opencode-sub]
volumes:
main: /root
startos: unmounted
startos: /etc/opencode-trust # provider-trust/ only, read-only, while a CA is set
file_models:
- startos/store.json
- main/.config/opencode/opencode.json
- startos/provider-trust/ca.pem
startos_managed_env_vars:
- OPENCODE_PASSWORD
- OPENCODE_DISABLE_AUTOUPDATE
- OPENCODE_KEY_<PROVIDER_ID>
- NODE_EXTRA_CA_CERTS
dependencies: none
interfaces:
ui: { type: ui, port: 4096 }
actions:
- set-admin-password
- configure-providers
- configure-provider-ca
tasks:
- { action: set-admin-password, severity: critical }
health_checks:
Expand Down
2 changes: 0 additions & 2 deletions startos/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@ export const main = sdk.setupMain(async ({ effects }) => {
const pem = await providerCa.read().const(effects)
const extraCaPath = pem ? providerCaPath : undefined
if (pem) {
// The `.const()` read above re-runs this setup — and so restarts the daemon —
// whenever the certificate changes, so the mount can sit at a fixed path.
mounts = mounts.mountVolume({
volumeId: 'startos',
subpath: providerCaDirectory,
Expand Down