fix: docker permission again two.
Some checks failed
Build and Push Docker Image / buildx (push) Has been cancelled

This commit is contained in:
2025-11-11 15:28:38 +08:00
parent 3c271a2a72
commit 17bbbe7fbc
4 changed files with 37 additions and 36 deletions

View File

@@ -3,12 +3,14 @@
# Create data directory if it doesn't exist
mkdir -p /app/data
# Try to set permissions for the data directory
# This might fail in some environments, but that's okay
chown -R 1001:1001 /app/data 2>/dev/null || true
chmod 755 /app/data 2>/dev/null || true
# Try to create the database file if it doesn't exist
touch /app/data/data.db 2>/dev/null || true
echo "Data directory initialized"
# Set permissions for the data directory and database file
chmod 777 /app/data 2>/dev/null || true
chmod 666 /app/data/data.db 2>/dev/null || true
echo "Data directory initialized with open permissions"
# Execute the main command
exec "$@"