Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

datapult's avatar

Laravel Octane and Docker

Hi there

I see a lot of online guides and even the official Laravel documentation saying that Laravel Octane should run with supervisor even inside a Docker container.

Is there any reason not to simply run php artisan octane:start as an entry point and use docker-compose to restart on failure?

Is there anything I am missing here because this way seems to tap into what is already possible with Docker and avoid introducing another component in my setup.

Thanks!

0 likes
7 replies
SteamDiesel's avatar

I'm curious about this subject, so I'm addinging comment to follow for updates.

Sinnbeck's avatar

Are you referring to the docs showing how to set up sail with docker? I cannot find anything in the docs with regards to a production set up

datapult's avatar

@Sinnbeck yeah, you're right. However, production or not, if I'm using docker compose, I'd tend to avoid a supervisor unless - and this back to my question - I'm missing something about why I can't let the docker compose daemon monitor if Octane shuts down.

And thanks for the reply!

Sinnbeck's avatar
Sinnbeck
Best Answer
Level 102

@datapult I think you can just do that. Sail is a bit strange as it does not use a real webserver. It uses php artisan serve. So to make it simple to configure he just set up a supervisor file to keep serve alive. Maybe there was a problem using php artisan serve as an entry point. But either way I think it's mostly based on the original implementation of that, and not octane. Hope that makes sense

Sail was made to get people who does not know docker up and running very fast, and with as simple config as possible

1 like
datapult's avatar

@Sinnbeck It makes sense. Thank you (og dejligt at støde på en dansker herinde!)

1 like
Sinnbeck's avatar

@datapult ja det er altid sjovt :)

Happy to help out. Personally I don't use sail as I would rather set up everything myself, or use lando

1 like

Please or to participate in this conversation.