@lara123, it might be relevant to your case. Especially that comment:
"If you did however call config:cache during local development, you can undo this by deleting the bootstrap/cache/config.php file. Otherwise, you might experience that calling getenv() will not return the desired values – Sven P Mar 11 '16 at 8:50"