Documentation/bugfix request: mapping paths in Docker
Nobody has claimed this yet.
- Dominant language
- Shell
- Stars
- 1.3k
- Forks
- 310
- Avg merge
- 3d 12h
- Merged PRs (30d)
- 1
Description
I installed overleaf-toolkit on a brand-new Mac, everything up to date, after installing Docker Desktop, into /opt/bin/overleaf-toolkit. Then when running bin/up I'd get error messages like:
The path /opt/overleaf-toolkit/data/mongo is not shared from the host and is not known to Docker.
You can configure shared paths from Docker -> Preferences... -> Resources -> File Sharing.
See https://docs.docker.com/go/mac-file-sharing/ for more info.
So I did what the messages seemed to be suggesting, and added the following as shared directories in Docker Desktop:
/opt/overleaf-toolkit/data/mongo
/opt/overleaf-toolkit/data/overleaf
/opt/overleaf-toolkit/data/redis
No more error messages, it starts, and I can use Overleaf. The problem is that after ending it with bin/stop and restarting with bin/up all the data is gone! It's a fresh installation asking me to create an admin account.
After much trial and error, I finally figured out that it only works correctly if I add a single shared directory instead:
/opt/overleaf-toolkit
With that, all the data actually persists across restarts. So this is obviously a required configuration, yet:
- It is not mentioned anywhere in the official configuration instructions -- 3: Initialize the configuration or Files and locations
- It produces no error when the
.../data/*paths are shared individually, but loses data silently across restart
So it seems like some combination of the following would be helpful?
- Updating the documentation for installation
- Clarifying the error message about the correct path that needs to be shared
- Producing an error if the correct path has not been shared
Hopefully this issue can help other people running into the same problem, with how to solve it.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with bin/up and bin/stop, then compare their path handling with the linked Docker file-sharing guidance and the toolkit documentation pages. Reproduce the separate-directory setup and verify that the documented configuration, error behavior, or validation prevents data from disappearing after a restart.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, shell
- Domain
- devops, documentation
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100