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
against accidental data loss on container restarts, but anonymous volumes are
169
173
deleted when the container is removed.
170
174
171
-
## Environment Variables
175
+
## Environment Variables (`.env` for Docker Compose)
172
176
173
177
| Variable | Default | Notes |
174
178
|----------|---------|-------|
175
-
|`OPENCODE_HOST`|`0.0.0.0`| Must be `0.0.0.0` for Docker Desktop port forwarding to work |
176
-
|`OPENCODE_PORT`|`3000`| Container port for the web UI |
179
+
|`OPENCODE_IMAGE`|`prizz/opencode-cloud-sandbox:latest`| Set a pinned tag (for example `15.2.0`) for reproducible deploys |
180
+
|`OPENCODE_PULL_POLICY`|`missing`| Compose pull behavior. `missing` does not re-pull when image already exists; use `always` to check registry on each `up`|
181
+
|`OPENCODE_PORT_MAPPING`|`127.0.0.1:3000:3000`| Host:container port mapping. Use `3000:3000` to expose publicly |
182
+
|`OPENCODE_HOST`|`0.0.0.0`| Hostname passed to opencode inside the container |
183
+
|`OPENCODE_STOP_GRACE_PERIOD`|`30s`| Grace period before force kill on shutdown |
184
+
|`OPENCODE_LOG_DRIVER`|`json-file`| Docker log driver used for container logs |
185
+
|`OPENCODE_LOG_MAX_SIZE`|`10m`| Maximum size for each rotated log file |
186
+
|`OPENCODE_LOG_MAX_FILE`|`3`| Number of rotated log files to retain |
177
187
178
188
## Updating
179
189
180
190
To update to a newer image version:
181
191
182
192
```bash
183
193
# Docker Compose
194
+
# default pull policy is "missing"
184
195
docker compose pull
185
196
docker compose up -d
186
197
@@ -200,7 +211,14 @@ Named volumes persist across this process. Your data is preserved.
200
211
Another service is using port 3000. Change the host port:
201
212
202
213
```bash
203
-
# Docker Compose: edit docker-compose.yml, change "127.0.0.1:3000:3000" to "127.0.0.1:8080:3000"
214
+
# One-off override
215
+
OPENCODE_PORT_MAPPING=127.0.0.1:8080:3000 docker compose up -d
0 commit comments