Volume path overlap with existing paths inside image
Assessment
- Difficulty
- 4/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 52/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- docker, php, sqlite
- Domain
- database, infrastructure
Research direction
Read the container configuration and the LinkStack application setup to find how /htdocs is mounted and where the SQLite database is configured or seeded. Check the existing volume definitions and startup process first. Done means the database can use its own configurable location, is created at container start, and only /htdocs/storage/app/public needs to persist uploaded files.
Written by the indexing model from the issue text.
Description
The /htdocs webroot inside the container is currently recommended to be configured as volume. However since it contains files required for the application to function, it causes issues with very common use-cases which override the volume content at mount, leaving an empty directory.
The following use-cases are currently impossible without workarounds (see below):
- Bind volumes with Docker/Podman/Compose
- Kubernetes volumes
A workaround is to copy the original content of the image in the volume with an init container, prior to the main container starting. But this rather hacky and not ideal.
The following changes would be required at minimum:
- Allow defining the location of the SQLite database file: that way it can be configured to be read from its own dedicated (sub-)directory and configured as volume
- I see a non-empty database is already present on the image's FS. If it is somehow seeded and built into the app that's also bad practice and instead it should be created from scratch at container start
- Only mount
/htdocs/storage/app/publicas a volume to persist file uploads: AFAIK the rest of the webroot doesn't need to be persisted
- Dominant language
- Shell
- Stars
- 527
- Forks
- 72
- PR merge metrics
- No merged PRs in 30d
Getting set up
- Ships a Dockerfile or Docker Compose file
- No pull request template
- No contributing guide
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.
More from LinkStackOrg/linkstack-docker
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
LinkStackOrg/linkstack-docker#170 · 17 comments · 11 reactions ·
-
Potential information disclosure: runtime Laravel log accessible without authentication in a Docker deploymentPossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 4/5 3-5 days Newbie friendliness 35/100
LinkStackOrg/linkstack-docker#168 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 55/100
LinkStackOrg/linkstack-docker#166 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 57/100
LinkStackOrg/linkstack-docker#161 · 1 comment ·
-
Difficulty 3/5 1-2 days Newbie friendliness 48/100
LinkStackOrg/linkstack-docker#160 · 3 comments ·
All issues in LinkStackOrg/linkstack-docker
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
level/task type/enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
wazuh/wazuh-installation-assistant#1177 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
ComputeCanada/puppet-magic_castle#634 ·
Maintainers usually reply within 1 day
-
source:reader type:enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
stephrobert/blog-roadmap#115 ·
-
area/cli bug priority/p2
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day