Skip to content

Commit

Permalink
[BUGFIX] Load env.prod file before server env vars
Browse files Browse the repository at this point in the history
  • Loading branch information
Lisa Kreitz committed Jun 4, 2024
1 parent ebee376 commit 6a643db
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions config/system/additional.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
$dotenv = Dotenv\Dotenv::createMutable(__DIR__ . '/../../', '.env.dist');
$dotenv->load();

if (file_exists(__DIR__ . '/../../.env')) {
$dotenv = Dotenv\Dotenv::createMutable(__DIR__ . '/../../');
if (\TYPO3\CMS\Core\Core\Environment::getContext() == 'Production') {
$dotenv = Dotenv\Dotenv::createMutable(__DIR__ . '/../../', '.env.prod');
$dotenv->load();
}

if (\TYPO3\CMS\Core\Core\Environment::getContext() == 'Production') {
$dotenv = Dotenv\Dotenv::createMutable(__DIR__ . '/../../', '.env.prod');
if (file_exists(__DIR__ . '/../../.env')) {
$dotenv = Dotenv\Dotenv::createMutable(__DIR__ . '/../../');
$dotenv->load();
}

Expand Down

0 comments on commit 6a643db

Please sign in to comment.