mirror of
https://github.com/chriswritescode-dev/opencode-manager.git
synced 2026-12-06 21:04:23 +01:00
Fix Docker volume permissions for SQLite database
- Add runtime permission fix in docker-entrypoint.sh to ensure /app/data volume has correct ownership before app starts - Remove build-time chown for /app/data from Dockerfile since Docker volumes are mounted at runtime, not build time - This resolves SQLITE_READONLY error when upgrading to OpenCode 1.4.0 The database volume may have incorrect ownership when mounted by Docker, causing the SQLite database to be read-only. The entrypoint script now fixes permissions before starting the backend (runs as root before USER node).
This commit is contained in:
1 parent
9973e00dc5
commit
2831533777
2 files changed
+12
-2
No files matched your search
@@ -75,5 +75,14 @@ if [ -z "$AUTH_SECRET" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Fix database directory permissions for Docker volumes
|
||||
# Docker volumes are mounted at runtime and may have incorrect ownership
|
||||
if [ -d "/app/data" ]; then
|
||||
echo "🔧 Ensuring database directory permissions..."
|
||||
chown -R node:node /app/data 2>/dev/null || true
|
||||
chmod -R 755 /app/data 2>/dev/null || true
|
||||
echo "✅ Database directory permissions set"
|
||||
fi
|
||||
|
||||
exec "$@"
|
||||
|
||||
Reference in new issue
Block a user