Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion upload-api/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ USER nodeapp

EXPOSE 4002

ENTRYPOINT ["docker-entrypoint.sh"]
ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"]

CMD ["npm", "run", "start"]
2 changes: 1 addition & 1 deletion upload-api/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
set -e

# Fix permissions for extracted_files volume at runtime
chown -R nodeapp:nodeapp /app/extracted_files
chown -R nodeapp:nodeapp /app/extracted_files || true
Copy link

Copilot AI Aug 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using || true to suppress all errors from the chown command could hide legitimate security issues. Consider checking if the directory exists first or only suppressing specific expected errors (e.g., chown -R nodeapp:nodeapp /app/extracted_files 2>/dev/null || [ -d /app/extracted_files ]).

Suggested change
chown -R nodeapp:nodeapp /app/extracted_files || true
[ -d /app/extracted_files ] && chown -R nodeapp:nodeapp /app/extracted_files

Copilot uses AI. Check for mistakes.

exec "$@"