You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Similar to what Sam did for Ruby, I think creating a Dockerfile generator would be interesting.
It's useful for anyone who wants to Dockerize Laravel
There are "flavors" of Docker container that we can allow people to choose from:
Nginx + PHP-FPM vs Nginx Unit vs Nginx + Laravel Octane
Whether we should build static assets or not (NodeJS build step)
PHP Version
Node Version
It de-couples flyctl from the Laravel stuff generated
My proposed command would be something like:
./fly dockerize --php 8.2 --node 16 --unit
Potential flags:
--php=8.2 - (version) Set the PHP version
--node=16 - (version) Set the Node version
--no-static - (bool) Do not build static assets (--node is ignored)
--unit - (bool) Install container with just Nginx Unit (no Nginx / PHP-FPM)
--fpm - (bool) Install container with Nginx + PHP-FPM (default)
--octane - (bool) Install container with Nginx + Octane support (swoole and roadrunner)
These settings could perhaps also be saved to a local .fly.yaml file or similar so when users run fly launch we could pre-populate PHP_VERSION / NODE_VERSIONOR those numbers could be hard-coded in the resulting Dockerfile so we don't need to care about those Docker build arguments (currently we have to set Docker build args).
The text was updated successfully, but these errors were encountered:
This would be an awesome addition to the fly-laravel package!
I agree on the settings saved on a .fly.yaml config, it makes the flag config passed by the user visible and findable somewhere( answers the short-term mem-loss question of what did I pass as flag again? Without having to check cmd history ).
Also, we can possibly read from that file as well instead of relying on flags. If there are no flags, we can check that file. If there are flags, override the values in that file?
Similar to what Sam did for Ruby, I think creating a Dockerfile generator would be interesting.
Nginx + PHP-FPM
vsNginx Unit
vsNginx + Laravel Octane
flyctl
from the Laravel stuff generatedMy proposed command would be something like:
Potential flags:
These settings could perhaps also be saved to a local
.fly.yaml
file or similar so when users runfly launch
we could pre-populatePHP_VERSION
/NODE_VERSION
OR those numbers could be hard-coded in the resultingDockerfile
so we don't need to care about those Docker build arguments (currently we have to set Docker build args).The text was updated successfully, but these errors were encountered: