Skip to content

Fix Docker mount warning to respect *_DIR env vars#391

Open
joaquinhuigomez wants to merge 1 commit intoForceu:masterfrom
joaquinhuigomez:fix/docker-mount-warning-env-vars
Open

Fix Docker mount warning to respect *_DIR env vars#391
joaquinhuigomez wants to merge 1 commit intoForceu:masterfrom
joaquinhuigomez:fix/docker-mount-warning-env-vars

Conversation

@joaquinhuigomez
Copy link
Copy Markdown

The Docker missing-mount warning always checks the hardcoded paths /app/data and /app/config. When GOKAPI_CONFIG_DIR or GOKAPI_DATA_DIR point to custom locations, the warning fires even though the actual directories are properly mounted.

This reads the resolved environment directories and walks parent paths when checking /proc/mounts, so a single volume mounted at a parent (e.g. /mnt_vol) is correctly detected for subdirectories like /mnt_vol/data.

Fixes #387

Use GOKAPI_CONFIG_DIR and GOKAPI_DATA_DIR to determine the actual
directories to check for volume mounts instead of hardcoded /app/config
and /app/data. Also walk parent directories when checking mounts so that
a single volume mounted at a parent path (e.g. /mnt_vol) is correctly
detected for subdirectories (e.g. /mnt_vol/data).

Fixes Forceu#387
@Forceu
Copy link
Copy Markdown
Owner

Forceu commented Apr 5, 2026

Thank you for the PR. Has the code been tested and has there been any AI involved in creating this code?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Docker missing mount warning doesn't respect *_DIR Environment Variables

2 participants