Fix Docker volume permissions for SQLite database
All checks were successful
Build And Test / publish (push) Successful in 47s
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:
15
entrypoint.sh
Normal file
15
entrypoint.sh
Normal 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 "$@"
|
||||
Reference in New Issue
Block a user