Share .env file with the NodeJS build script.
This commit is contained in:
parent
35dce01323
commit
99e3e3111a
7 changed files with 88 additions and 84 deletions
15
misuzu.php
15
misuzu.php
|
@ -14,8 +14,9 @@ $msz = (function() {
|
|||
try {
|
||||
\Dotenv\Dotenv::createImmutable(Misuzu::PATH_ROOT)->load();
|
||||
|
||||
if(!empty($_ENV['SENTRY_DSN']))
|
||||
\Sentry\init(['dsn' => $_ENV['SENTRY_DSN']]);
|
||||
$sentry = Misuzu::env('SENTRY_DSN');
|
||||
if(!empty($sentry))
|
||||
\Sentry\init(['dsn' => $sentry]);
|
||||
|
||||
$whoops = new \Whoops\Run;
|
||||
if(Misuzu::cli())
|
||||
|
@ -29,11 +30,11 @@ $msz = (function() {
|
|||
|
||||
return new MisuzuContext(
|
||||
$timings,
|
||||
$_ENV['DATABASE_DSN'] ?? 'null:',
|
||||
$_ENV['DOMAIN_ROLES'] ?? 'localhost=main,redirect,storage',
|
||||
$_ENV['STORAGE_PATH_LOCAL'] ?? Misuzu::PATH_STORAGE,
|
||||
$_ENV['STORAGE_PATH_REMOTE'] ?? '/_storage',
|
||||
$_ENV['TEMPLATE_CACHE'] ?? '',
|
||||
Misuzu::env('DATABASE_DSN', 'null:'),
|
||||
Misuzu::env('DOMAIN_ROLES', 'localhost=main,redirect,storage'),
|
||||
Misuzu::env('STORAGE_PATH_LOCAL', Misuzu::PATH_STORAGE),
|
||||
Misuzu::env('STORAGE_PATH_REMOTE', '/_storage'),
|
||||
Misuzu::env('TEMPLATE_CACHE', ''),
|
||||
);
|
||||
} finally {
|
||||
$timings->lap('startup');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue