Skip to content

Commit 735a7a4

Browse files
feat: Add ownership and permissions setup for node_modules directory in initialization script. (#112)
1 parent 39839b1 commit 735a7a4

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

docker/entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
2-
+set -euo pipefail
2+
set -euo pipefail
33

44
echo "=== Container Starting ==="
55
echo "Running initialization script..."

docker/init.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,14 @@ if [ -f "/app/composer.json" ] && [ ! -d "/app/vendor" ]; then
6565
echo -e "${GREEN}✓ Composer dependencies installed successfully.${NC}"
6666
fi
6767

68+
# Set permissions for node_modules directory if it exists
69+
if chown -R www-data:www-data /app/node_modules 2>/dev/null; then
70+
chmod -R 775 /app/node_modules
71+
echo -e "${GREEN}✓ Node modules directory ownership set${NC}"
72+
else
73+
echo -e "${YELLOW}⚠ Node modules directory ownership could not be set (mounted volume?)${NC}"
74+
fi
75+
6876
echo -e "${GREEN}Starting supervisord...${NC}"
6977

7078
# Start supervisord

0 commit comments

Comments
 (0)