I was in a similar situation months ago. All the images I could find seemed over complicated (compiling, or putting all the stack in a single container which goes against Docker recommended best practices, specially knowing most of the components of the usual Laravel stack have an official and well maintained Docker image), so I created my own stack based on Docker Compose:
It uses the latest version of the official Alpine Linux images so creating/updating/deploying the containers takes no time. The only modification of the PHP image is adding Supervisord and Postgres and Redis PHP extensions. Instead of Postgres you could easily use the official MySQL image if you prefer but AFAIK there is no Alpine version for it.
The only reason it says is not for production is because the source code and .env file are provided to the container via Docker volumes to aid with the development instead of being built into the container. Other than that is played by the book.
I plan to switch the reverse proxy image from nginx to Traefik.
Nginx is not being used as a reverse proxy in this set up. It serves the Laravel app. I personally also use Traefik for all of my containers so I don't have to bother opening and remembering ports.
What advantage are you getting with Supervisor?
The only reason Supervisor is used is so that both PHP-FPM and Laravel queue workers run at the same time in the same container. The advantage is you can control the number and type of queue workers without having to rebuild the container. If you don't plan on using the Laravel queues there is no need for using Supervisor. In that case, you could leave the original entrypoint of the container intact and everything (except queues) will still work. Queues are my favourite Laravel fearure so I cannot image using Laravel without them, that's why I included support for them.
Should such a feature be needed, another image using any job scheduler and exposing an API should work right?
Supervisor is used for service supervision. It runs long-lasting processes and ensures they are restarted in case they fail. AFAIK it doesn't have any API. Yes, you could put the Laravel queue in a separate container but to ensure the queues work well you will need to replicate the exact same PHP environment that you already have in your FPM container, which seems pointless.
I don't see an .env file being included anywhere
The idea of the approach is making developing in Laravel as similar as possible as they way you would do it without Docker. The same way Laravel does not incluide a .env file this repo doesn't include one too. You have create it similarly as you would do it without Docker. That way you can configure Laravel to your needs. The whole Laravel directory is part of a volume, so you just have to copy your own .env file into the Laravel directory and the container will use it.
There isn't a no-no there. PHP allows it by design. You'll have to redesign the language to stop supporting that behavior. See https://www.php.net/manual/en/language.types.type-juggling.php
NodeJS is not even a framework
sudo rm -rf /*
I was in a similar situation months ago. All the images I could find seemed over complicated (compiling, or putting all the stack in a single container which goes against Docker recommended best practices, specially knowing most of the components of the usual Laravel stack have an official and well maintained Docker image), so I created my own stack based on Docker Compose:
https://github.com/Stolz/laravel-docker-stack
It uses the latest version of the official Alpine Linux images so creating/updating/deploying the containers takes no time. The only modification of the PHP image is adding Supervisord and Postgres and Redis PHP extensions. Instead of Postgres you could easily use the official MySQL image if you prefer but AFAIK there is no Alpine version for it.
The only reason it says is not for production is because the source code and .env file are provided to the container via Docker volumes to aid with the development instead of being built into the container. Other than that is played by the book.
Nginx is not being used as a reverse proxy in this set up. It serves the Laravel app. I personally also use Traefik for all of my containers so I don't have to bother opening and remembering ports.
The only reason Supervisor is used is so that both PHP-FPM and Laravel queue workers run at the same time in the same container. The advantage is you can control the number and type of queue workers without having to rebuild the container. If you don't plan on using the Laravel queues there is no need for using Supervisor. In that case, you could leave the original entrypoint of the container intact and everything (except queues) will still work. Queues are my favourite Laravel fearure so I cannot image using Laravel without them, that's why I included support for them.
Supervisor is used for service supervision. It runs long-lasting processes and ensures they are restarted in case they fail. AFAIK it doesn't have any API. Yes, you could put the Laravel queue in a separate container but to ensure the queues work well you will need to replicate the exact same PHP environment that you already have in your FPM container, which seems pointless.
The idea of the approach is making developing in Laravel as similar as possible as they way you would do it without Docker. The same way Laravel does not incluide a .env file this repo doesn't include one too. You have create it similarly as you would do it without Docker. That way you can configure Laravel to your needs. The whole Laravel directory is part of a volume, so you just have to copy your own .env file into the Laravel directory and the container will use it.