Environment option doesn't works
opened this issue · comments
I have this package in my project and is deployed is development server and in a production server, I have backup command execution in scheduled in my console/kernel.php like this:
db:backup --database=mysql --destination=s3 --destinationPath=backups/ --timestamp='d-m-Y' --compression=gzip --env=production
But this is running in my development server which have APP_ENV=staging in .env file.
How is the way to achieve the execution only in production environment?
The --env option is a laravel feature. It has nothing to do with which environments it won't run on. The feature determines which .env files are loaded in Laravel's configurations.
https://laravel.com/docs/5.6/configuration#environment-configuration
best of luck =)