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

Environment detection #19

Closed
pedrommone opened this issue Nov 24, 2014 · 2 comments
Closed

Environment detection #19

pedrommone opened this issue Nov 24, 2014 · 2 comments
Milestone

Comments

@pedrommone
Copy link

You should implement a environment detection or doc it if already exist.

@jbrooksuk
Copy link
Member

The only detection that happens is for Heroku. It's a bit flimsy actually:

$env = $app->detectEnvironment(function() {
    // Take care of Heroku deployment for us.
    if ($envName = getenv('ENV')) {
        return $envName;
    }

    // Always fall back to local.
    return 'local';
});

When deploying to Heroku an environmental variable is created named ENV=heroku (unless the user changes it). This is the only time we check, otherwise it'll fallback to local, which is obviously not always ideal.

@jbrooksuk
Copy link
Member

I forgot to mention that technically if you have an environment var named ENV you can set it to production if you wanted to.

But yes, this should be documented.

@CuReSoft CuReSoft mentioned this issue Jan 4, 2015
@GrahamCampbell GrahamCampbell modified the milestone: V0.1.0 Alpha Jul 25, 2015
@ghost ghost mentioned this issue Aug 2, 2018
MathisG-Recia pushed a commit to MathisG-Recia/Cachet that referenced this issue Apr 13, 2021
French translation for notifications
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

3 participants