Update README.md
Browse files
README.md
CHANGED
|
@@ -1,21 +1,23 @@
|
|
| 1 |
---
|
| 2 |
-
title: OpenCode Web (Persistent via HF
|
| 3 |
sdk: docker
|
| 4 |
app_port: 7860
|
| 5 |
---
|
| 6 |
|
| 7 |
-
This Space runs `opencode web`
|
| 8 |
|
| 9 |
-
|
| 10 |
-
|
|
|
|
| 11 |
|
| 12 |
-
### Required Secrets
|
| 13 |
- `OPENCODE_SERVER_PASSWORD` (required)
|
| 14 |
-
- `HF_TOKEN` (required for persistence
|
| 15 |
|
| 16 |
-
### Required Variables
|
| 17 |
- `HF_BUCKET_ID` (example: `habppyar/ocweb-storage`)
|
| 18 |
|
| 19 |
### Optional Variables
|
| 20 |
- `BACKUP_INTERVAL_SECONDS` (default: 120)
|
| 21 |
-
- `BUCKET_PREFIX` (default: `opencode-backup`)
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
title: OpenCode Web (Persistent via HF Storage Bucket)
|
| 3 |
sdk: docker
|
| 4 |
app_port: 7860
|
| 5 |
---
|
| 6 |
|
| 7 |
+
This Space runs `opencode web`.
|
| 8 |
|
| 9 |
+
Persistence strategy:
|
| 10 |
+
- Do NOT rely on writing to `/data` (bucket mount can be read-only for UID=1000).
|
| 11 |
+
- Persist by periodically uploading backups to a **Hugging Face Storage Bucket** using `hf buckets cp`.
|
| 12 |
|
| 13 |
+
### Required Secrets
|
| 14 |
- `OPENCODE_SERVER_PASSWORD` (required)
|
| 15 |
+
- `HF_TOKEN` (required for persistence)
|
| 16 |
|
| 17 |
+
### Required Variables
|
| 18 |
- `HF_BUCKET_ID` (example: `habppyar/ocweb-storage`)
|
| 19 |
|
| 20 |
### Optional Variables
|
| 21 |
- `BACKUP_INTERVAL_SECONDS` (default: 120)
|
| 22 |
+
- `BUCKET_PREFIX` (default: `opencode-backup`)
|
| 23 |
+
- `BACKUP_AUTH_JSON` (default: 0) # set to 1 ONLY if you accept storing auth.json in bucket
|