open-nomie / nomie6-oss

Opensource version of Nomie 6
MIT License
509 stars 60 forks source link

Data persistence for single container docker deployment #55

Closed max-tet closed 1 year ago

max-tet commented 1 year ago

Hi,

I would like to deploy nomie within a single docker container (no additional database) and I have tried it with docker run --rm -it -p 8080:80 ghcr.io/qcasey/nomie6-oss:master. It is starting alright and works fine.

But now I'd like to mount a directory in order to persist data between restarts. I could not find any documentation about the dirs that need to be mounted.

So where does nomie store its data? Also, it might be a good idea to document this.

Thanks!

RdeLange commented 1 year ago

Nomie does not store data on the server / in the docker container. Data is stored locally on the device Nomie is running on. (Your phone, tablet, desktop or laptop) So there is no need to configure volume mounts to persist data.

max-tet commented 1 year ago

Oh yes, I didn't catch that! Thanks for the clarification.

I've seen discussions about how to use CouchDB with Nomie. Is that a way to persist data independent of the local device?

I am asking because I would like to feature Nomie on my product Portal and for that to work, I would need to save data server-side (so that people can access it with multiple devices) and it needs to be a single Docker container (due to current technical restrictions). Is there any way at all to host Nomie like that?

RdeLange commented 1 year ago

Yes CouchDB is the way to persist data in a separate hosted database. In the background this Couchdb will keep your Nomie data on your different sevicea synced. It is possible to host Nomie and couchdb in 1 container. Having multiple users connecting to the same CouchDB might be a challenge as you need to find a way to manage the individual database instances and authorizations for those users.

max-tet commented 1 year ago

Ok, makes sense. Do you know if there is an existing container image with Nomie + CouchDB? Or would I have to build one myself?

RdeLange commented 1 year ago

Please find #11 for some instructions

RdeLange commented 1 year ago

Closing issue as information has been shared as requested

max-tet commented 1 year ago

Thanks for the hints, I'll try and work something out.