You can set global environment variables by adding them to your Homestead.yaml file:
variables:
– key: APP_ENV
value: local
– key: FOO
value: bar
After updating the Homestead.yaml, be sure to re-provision the machine by running vagrant reload –provision. This will update the PHP-FPM configuration for all of the installed PHP versions and also update the environment for the vagrant user.
Configuring Cron Schedules
Laravel provides a convenient way to schedule Cron jobs by scheduling a single schedule:run Artisan command to be run every minute. The schedule:run command will examine the job schedule defined in your App\Console\Kernel class to determine which jobs should be run.
If you would like the schedule:run command to be run for a Homestead site, you may set the schedule option to true when defining the site:
sites:
– map: homestead.test
to: /home/vagrant/code/Laravel/public
schedule: true
The Cron job for the site will be defined in the /etc/cron.d folder of the virtual machine.
cron.d って、くろんタブですな。
Configuring Mailhog
Mailhog allows you to easily catch your outgoing email and examine it without actually sending the mail to its recipients. To get started, update your .env file to use the following mail settings:
MAIL_DRIVER=smtp
MAIL_HOST=localhost
MAIL_PORT=1025
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null
Once Mailhog has been configured, you may access the Mailhog dashboard at http://localhost:8025
driverはsmtp
Configuring Minio
Minio is an open source object storage server with an Amazon S3 compatible API. To install Minio, update your Homestead.yaml file with the following configuration option:
minio: true
By default, Minio is available on port 9600. You may access the Minio control panel by visiting http://homestead:9600/. The default access key is homestead, while the default secret key is secretkey. When accessing Minio, you should always use region us-east-1.
In order to use Minio you will need to adjust the S3 disk configuration in your config/filesystems.php configuration file. You will need to add the use_path_style_endpoint option to the disk configuration, as well as change the url key to endpoint:
minio? 知らんぞ
's3' => [ 'driver' => 's3', 'key' => env('AWS_ACCESS_KEY_ID'), 'secret' => env('AWS_SECRET_ACCESS_KEY'), 'region' => env('AWS_DEFAULT_REGION'), 'bucket' => env('AWS_BUCKET'), 'endpoint' => env('AWS_URL'), 'use_path_style_endpoint' => true ]
あーs3だ。
inally, ensure your .env file has the following options:
AWS_ACCESS_KEY_ID=homestead
AWS_SECRET_ACCESS_KEY=secretkey
AWS_DEFAULT_REGION=us-east-1
AWS_URL=http://homestead:9600
To provision buckets, add a buckets directive to your Homestead configuration file:
buckets:
– name: your-bucket
policy: public
– name: your-private-bucket
policy: none
Supported policy values include: none, download, upload, and public.
ok,ok