Skip to content

Commit

Permalink
Merge pull request #25 from fly-apps/fix_docker_template_for_laravel_…
Browse files Browse the repository at this point in the history
…versions_below_11

Fix dockerfile template generated for Laravel versions below 11
  • Loading branch information
KTanAug21 authored Mar 21, 2024
2 parents cae11b0 + c2078b0 commit 731f969
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Binary file modified builds/dockerfile-laravel
Binary file not shown.
7 changes: 5 additions & 2 deletions resources/views/dockerfile.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,11 @@
@if( preg_match("~\^|^1[1-9]~", $laravel_version ) )&& sed -i='' '/->withMiddleware(function (Middleware \$middleware) {/a\
\$middleware->trustProxies(at: "*");\
' bootstrap/app.php; \
@else&& sed -i 's/protected \$proxies/protected \$proxies = "*"/g' app/Http/Middleware/TrustProxies.php;\ @endif
if [ -d .fly ]; then cp .fly/entrypoint.sh /entrypoint; chmod +x /entrypoint; fi;
if [ -d .fly ]; then cp .fly/entrypoint.sh /entrypoint; chmod +x /entrypoint; fi;
@else&& sed -i 's/protected \$proxies/protected \$proxies = "*"/g' app/Http/Middleware/TrustProxies.php;\
if [ -d .fly ]; then cp .fly/entrypoint.sh /entrypoint; chmod +x /entrypoint; fi;
@endif


@if(in_array($octane, ['frankenphp', 'roadrunner', 'swoole']))
@include('octane-'.$octane)
Expand Down

0 comments on commit 731f969

Please sign in to comment.