deranjer / goEDMS

golang/react EDMS for home users
MIT License
7 stars 2 forks source link

Database lost after recreating docker container #3

Closed Madic- closed 4 years ago

Madic- commented 4 years ago

Hello,

after recreating the docker container, the following files would get lost when not placed somewhere else because they only exist in the container:

Can you extend the docker installation documentation with a way, to also persist those files?

deranjer commented 4 years ago

Yes, sorry, this is just a dumb mistake on my part, my inexperience with docker showing. I'll fix that in the next hotfix.

deranjer commented 4 years ago

Hmm, so trying to figure this out actually, first time using docker. Both database files are generated by the executable on run time, do I just do two more mounts for both those files? Seems like a whole lot of config options. I'll be doing more research I think.

Madic- commented 4 years ago

Just creating two more volume mounts are problematic because at first run, both files do not exist. I think best would be creating a subfolder (like ./data) where all files reside. Than only the ./data folder needs to be mounted. And beneath this ./data directory you can save the database, log and config file. Though this could be a breaking change for current installations.

An approach could be creating environment variables where you can define the location of various config files or config directories inside the container. Many dockerised applications are doing this.

deranjer commented 4 years ago

Okay, I moved everything to the "databases" folder and mounted that, and that seems to work. Please check the documentation and try it again.

Madic- commented 4 years ago

Thank you. That worked. From my point of view this issue can be closed