Open magic-77 opened 4 years ago
How about using dotenv ? It is refered in cookbook.
The .env file is generally listed in .gitignore
, so you have to create the file in each stage.
Once you set .env
and define ENVIRONMENT
, you can read it from CakeApp by using env('ENVIRONMENT')
.
In addition, Sentry SDK will load which stage the app is running from $SERVER['SENTRY_ENVIRONMENT']. So you can also use this way. see: https://docs.sentry.io/error-reporting/configuration/?platform=php#environment
If you configure Sentry in your app/config/app.php
file, you need to use the options
key. Like this:
'Sentry' => [
'dsn' => '__DSN__',
'options' => [
'environment' => 'production',
],
],
Hi, how to define Environments for
can't find any Docs how to do it for a CakePHP App
EDIT: in "app/config/app.php" i have setup these settings for each instance