11[ ![ Packagist Version] ( https://img.shields.io/packagist/v/blamebutton/laravel-docker-builder )] ( https://packagist.org/packages/blamebutton/laravel-docker-builder )
22![ GitHub Workflow Status] ( https://img.shields.io/github/actions/workflow/status/blamebutton/laravel-docker-builder/phpunit.yml )
33
4- # Laravel Docker Build
4+ # Laravel Docker Builder
5+
6+ ## Features
7+
8+ * Detect PHP version and extensions
9+ * Bundle assets with Vite.js or Laravel Mix
10+ * Separate NGINX and PHP-FPM images
11+ * Deployment examples for Kubernetes and Docker Compose
512
613## Installation
714
@@ -28,6 +35,36 @@ DOCKER_PHP_TAG=laravel-app:php
2835
2936## Usage
3037
38+ ### Detect Configuration
39+
40+ ``` shell
41+ php artisan docker:generate --detect
42+ ```
43+
44+ When ` --detect ` is passed to the ` docker:generate ` command, it will automatically detect the following requirements:
45+
46+ * PHP version, detected using the ` php ` version in your ` composer.json `
47+ * PHP extensions, detected using the configuration of your project:
48+ * Cache driver: Redis, Memcached, APC
49+ * Database driver: MySQL, Postgres, SQL Server
50+ * Broadcasting driver: Redis
51+ * Queue driver: Redis
52+ * Session driver: Redis, Memcached, APC
53+ * Node package manager, detected using the existence of ` package-lock.json ` or ` yarn.lock `
54+ * Node build tool, detected using the existence of ` vite.config.js ` or ` webpack.mix.js `
55+
56+ ### Manual Configuration
57+
3158``` shell
32- php artisan docker:build
59+ php artisan docker:generate
3360```
61+
62+ When no options are passed to ` docker:generate ` , a prompt is used to configure the project's requirements.
63+
64+ See all available options, and their supported values, by running ` php artisan docker:generate --help ` .
65+
66+ * ` -p, --php-version ` - PHP version for Docker image
67+ * ` -e, --php-extensions ` - PHP extensions (comma-separated) to include in Docker image
68+ * ` -o, --optimize ` - Run ` php artisan optimize ` on container start
69+ * ` -m, --node-package-manager ` - Install Node dependencies using NPM or Yarn
70+ * ` -b, --node-build-tool ` - Run Vite.js or Laravel Mix build step
0 commit comments