habppyar commited on
Commit
4d5d628
·
verified ·
1 Parent(s): d17c742

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +10 -8
README.md CHANGED
@@ -1,21 +1,23 @@
1
  ---
2
- title: OpenCode Web (Persistent via HF Bucket Backup)
3
  sdk: docker
4
  app_port: 7860
5
  ---
6
 
7
- This Space runs `opencode web` on port 7860.
8
 
9
- ### Why not write to /data directly?
10
- Even if a Storage Bucket is mounted to `/data`, it can be mounted via FUSE with permissions that are not writable by the runtime UID=1000 user. In that case, we persist by **uploading backups to the bucket via `hf buckets cp`** instead of writing to `/data`.
 
11
 
12
- ### Required Secrets (Space Settings -> Secrets)
13
  - `OPENCODE_SERVER_PASSWORD` (required)
14
- - `HF_TOKEN` (required for persistence; must have write access to your bucket)
15
 
16
- ### Required Variables (Space Settings -> 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