laravel 5 - How to read environment variables in travis-ci for Lumen application -
i have lumen application using dotenv library vlucas. when trying deploy, travis-ci complains there no ".env" file. need modify bootstrap/app.php file conditionally load dotenv class, or there better way handle this?
the error message i'm getting is:
php fatal error: uncaught exception 'invalidargumentexception' message 'dotenv: environment file .env not found or not readable. create file environment settings @ /home/travis/build/project/repo/bootstrap/../.env' in /home/travis/build/project/repo/vendor/vlucas/phpdotenv/src/dotenv.php:33
be careful .env file @ root of lumen project in .gitignore shipped lumen.
if file isn't relevant you, can comment dotenv::load(__dir__.'/../');
line @ top of bootstrap/app.php
.
Comments
Post a Comment