I am deploying a Laravel app and a part of my build script is to run ./artisan migrate. While I can pass environment variables to web server by adding them to nginx site config in sites-available, they for obvious reasons do not get shared with CLI.
Is there a way to include the same env variables to both web server and CLI to use? I tried adding a config file with values to /etc/php/7.0/fpm/pool.d/
but it did not work.
My /etc/php/7.0/fpm/pool.d/env.conf
[env]
env[APP_ENV] = production