vrtmrz / obsidian-livesync

MIT License
3.92k stars 132 forks source link

Is huggingface a possible platform for deployment? #442

Closed IsidoreSong closed 1 month ago

IsidoreSong commented 1 month ago

Huggingface provides Space service which contains unlimited 2v CPU 16G RAM hardware.

It supports docker. I already doploy a test space follow setup couchdb with docker for live-sync but it brings me "https://any:5984/_session","USERNAME", {conn_failed,{error,nxdomain}}}" when "Verify CouchDB Installation" at "Replication". The DB Test in plugin is successful but when I check the target database it only has one obsydian_livesync_version.

I'm not sure what's wrong with it. But if deploy on huggingface is possible, it would be very promising. More details about it could be found at https://huggingface.co/docs/hub/spaces-overview.

IsidoreSong commented 1 month ago

ok, I see. The server is a catch for sync. When livesync mode is activated, there are files on it. https://github.com/vrtmrz/obsidian-livesync/blob/main/docs/tech_info.md

Huggingface is valid and could be used in China, great!

IsidoreSong commented 1 month ago

emmm, one more thing need to be mentioned, as it is a free plan, its storage is not permenant. So every time you change the config it rebuilt again and that's what I suffers. But I can endure this 30 minutes waiting with my 500 notes and 70+ plugins, as I don't need to do this everyday. Maybe less frequent than once a year after a successful deployment. Thus it is acceptable for me.

Facni commented 1 month ago

Every time you change what config?

IsidoreSong commented 1 month ago

Technically everything before running the docker, like docker file, local.ini, and COUCH_USER & COUCH_PASSWORD. But the deployment process is really simple, just copy the loca.ini, write a 2-line Dockerfile and set 2 environment varaiable. I'm still exploring this plugin. But this config already support live syncing. I like it.

Facni commented 1 month ago

Hey, instead of close this issue, we could write a tutorial alongside the fly.io and cloudant.