Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Filament Cache Command through Laravel Scanner's Dockerfile Template #3339

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

KTanAug21
Copy link
Contributor

Change Summary

What and Why:
What: Run Filament Cache command when Filament is installed for a Laravel application

Why: Thanks to community post, it was discovered that Laravel apps with Filament installed get really low requests per second( I tested, and got 5 requests per second ). This can be improved by running Filament's cache commands.

How:
Revise Laravel's Dockerfile template to run the Filament cache commands when "filament/filament" is detected in the composer.json file

Related to:
Community post

Documentation

  • Fresh Produce
  • In superfly/docs, or asked for help from docs team
  • n/a

Copy link
Contributor

@Johannes-Werbrouck Johannes-Werbrouck left a comment

Choose a reason for hiding this comment

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

Looks good. The check that's failing is because in Line 47 of your commit, there was some whitespace. The check cleaned this up before the pull request was made so you don't need to make any changes.

Copy link
Contributor

@Johannes-Werbrouck Johannes-Werbrouck left a comment

Choose a reason for hiding this comment

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

Looks good to me!

@@ -3,3 +3,9 @@
/usr/bin/php /var/www/html/artisan config:cache --no-ansi -q
/usr/bin/php /var/www/html/artisan route:cache --no-ansi -q
/usr/bin/php /var/www/html/artisan view:cache --no-ansi -q

# Filament v3.2 Performance Improvement with commands
if grep "filament/filament.*:.*3\.2" "/var/www/html/composer.json"; then
Copy link
Contributor

Choose a reason for hiding this comment

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

Not sure if you need the options -Fq here as well? (you probably don't)
-F disables regex searching, so would make sense to remove.
-q makes the command quiet, not sure what impact this would have.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

removed the options

@KTanAug21
Copy link
Contributor Author

Looks good. The check that's failing is because in Line 47 of your commit, there was some whitespace. The check cleaned this up before the pull request was made so you don't need to make any changes.

Hey @Johannes-Werbrouck ! Thanks for checking in! Noted on the above

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants