Add Laravel Octane Support #72
Replies: 13 comments 9 replies
|
Just adding a note that @fideloper added a PR for one of his projects using Octane. This might be a good thing to reference and bring back into the project natively: superfly/flyctl#1143 |
|
I'm running Octane in production. At the moment I'm using RoadRunner, but Swoole is also good! Due to personal preference, I ended up building my own images in Alpine, but it may be useful for your research. Let me know if there's anything I could help with and I will try to answer to the best of my abilities 🙌 |
|
Having support for Octane with Swoole would be awesome. Thanks for the good work @jaydrogers 🙌🏼 |
|
that would be nice to do , i would love to have alpine version of laravel octane on swoole . |
|
We're waiting for this :^), already using the docker-php@2.x and very satified |
|
Up! Hope you will add such feature.. We really need it! |
|
Just putting another post in here to say that this would be an amazing addition! |
|
any news/plans about this ? we really want to use spin pro but we relay on Laravel Octane. |
|
FYI, this is my Dockerfile that runs octane in FROM serversideup/php:8.4-fpm-nginx
USER root
RUN install-php-extensions openswoole
RUN sed -i 's|try_files .*;|try_files $uri $uri/ @octane;|g' /etc/nginx/site-opts.d/*.conf.template
RUN sed -i 's|fastcgi_pass .*;|try_files /.well-known/dummy @octane;|g' /etc/nginx/site-opts.d/*.conf.template
RUN printf SIGINT > /etc/s6-overlay/s6-rc.d/php-fpm/down-signal
USER www-data
COPY --chmod=0755 --chown=root:root <<'EOF' /etc/s6-overlay/s6-rc.d/php-fpm/run
#!/command/execlineb -P
with-contenv
s6-notifyoncheck -d
/usr/local/bin/php /var/www/html/artisan octane:start --port=9000
EOF
COPY --chmod=0755 --chown=root:root <<'EOF' /usr/local/bin/php-fpm-healthcheck
#!/bin/sh
/usr/local/bin/php /var/www/html/artisan octane:status
EOF
COPY --chmod=0755 --chown=root:root <<'EOF' /usr/local/bin/nginx-healthcheck
#!/bin/sh
curl --insecure --silent --location --show-error --fail http://localhost:8080$HEALTHCHECK_PATH
EOF
COPY --chown=www-data:www-data <<'EOF' /etc/nginx/conf.d/connection_upgrade.conf
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
EOF
COPY --chown=www-data:www-data <<'EOF' /etc/nginx/server-opts.d/octane.conf
location @octane {
set $suffix "";
if ($uri = /index.php) {
set $suffix ?$query_string;
}
proxy_http_version 1.1;
proxy_set_header Host $http_host;
proxy_set_header Scheme $scheme;
proxy_set_header SERVER_PORT $server_port;
proxy_set_header REMOTE_ADDR $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
proxy_pass http://127.0.0.1:9000$suffix;
}
EOF
COPY --chown=www-data:www-data <<'EOF' /etc/nginx/server-opts.d/healthcheck-octane.conf
location /healthcheck-octane {
access_log off;
return 200 "OK";
}
EOF
ENV HEALTHCHECK_PATH="/healthcheck-octane"
HEALTHCHECK --interval=5s --timeout=3s --retries=3 \
CMD [ "sh", "-c", "nginx-healthcheck && php-fpm-healthcheck || exit 1" ]Looks like it would be much easier with |
🚀 Huge updateNative Octane support is now in beta: https://github.com/serversideup/docker-php/releases/tag/v4.0.0-beta3 |
|
Wow! Just found about this project today. The whole 4.0 release looks so professional, the docs explains better what docker/frankenphp/octane is than their official docs and I am just stunned. Definitely the way forward in our ecosystem! |
✅ Laravel Octane now available!Laravel Octane is now natively supported with v4.0.0 🎉 |
|
Can we make the octane setup cleaner by using ENV and embed the exec php artisan octane:start --server=frankenphp --port=8080 |

Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Background
✅ UDPATE: Laravel Octane now available!
Laravel Octane support is now natively available with v4.0.0 🎉
Learn more about Laravel Octane →
All reactions