0

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
Vladimir Hraban
  • 3,543
  • 4
  • 26
  • 46

1 Answers1

0

As far as I know, you need to create same file in /etc/php/7.0/cli/pool.d/env.conf or make symlink.

We assume, php-cli is installed.

antonbormotov
  • 1,821
  • 2
  • 20
  • 32