Fix Docker volume permissions for SQLite database
All checks were successful
Build And Test / publish (push) Successful in 47s

Container runs as non-root user but mounted volumes may be owned by root.
Added entrypoint script to fix /data permissions before starting the app.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2025-12-30 16:11:08 -08:00
parent 87c55e0f1f
commit 73d3ff4319
2 changed files with 26 additions and 5 deletions

15
entrypoint.sh Normal file
View File

@@ -0,0 +1,15 @@
#!/bin/sh
set -e
# Ensure /data directory exists and is writable
# This handles the case where a Docker volume is mounted with root ownership
if [ ! -w /data ]; then
echo "Warning: /data not writable, attempting to fix permissions..."
# This will only work if running as root
chown -R mcp:mcp /data 2>/dev/null || true
fi
# Create the data directory if it doesn't exist
mkdir -p /data 2>/dev/null || true
exec "$@"