Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check ExampleEnvironmentVariablesAreSet doesn't check actual environment variables #83

Open
rick-nu opened this issue Jul 18, 2019 · 1 comment

Comments

@rick-nu
Copy link

rick-nu commented Jul 18, 2019

What

The check ExampleEnvironmentVariablesAreSet only compares the .env.example with the .env file. It would make sense to check if actual environment variables are set too.

Why

We're running a laravel project in Kubernetes. In the production container there is no .env file, but instead the environment variables are set on the container directly. We want to run the ExampleEnvironmentVariablesAreSet as "init container" to be sure that the container doesn't start with missing environment variables.

Proposed fix

Also check the actual environment variables (getenv()), don't just compare the .env file.

@mtolhuys
Copy link

Just a suggestion: maybe checking where env() get's called inside the config folder and checking if the contents of those are set could be a cool addition to this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants