Commit f4dd1368 authored by Tobias Munk's avatar Tobias Munk

updates for Dotenv 2.0

parent a926e93d
<?php
Dotenv::load(__DIR__.'/../..');
$dotenv = new Dotenv\Dotenv(__DIR__ . '/../..');
$dotenv->load();
Dotenv::required('YII_DEBUG',["","0","1","true",true]);
Dotenv::required('YII_ENV',['dev','prod','test']);
Dotenv::required(['YII_TRACE_LEVEL']);
Dotenv::required(['APP_NAME','APP_SUPPORT_EMAIL','APP_ADMIN_EMAIL']);
Dotenv::required(['DATABASE_DSN','DATABASE_USER','DATABASE_PASSWORD']);
$dotenv->required('YII_DEBUG', ["", "0", "1", "true", true]);
$dotenv->required('YII_ENV', ['dev', 'prod', 'test']);
$dotenv->required(['YII_TRACE_LEVEL']);
$dotenv->required(['APP_NAME', 'APP_SUPPORT_EMAIL', 'APP_ADMIN_EMAIL']);
$dotenv->required(['DATABASE_DSN', 'DATABASE_USER', 'DATABASE_PASSWORD']);
Dotenv::setEnvironmentVariable('APP_VERSION', file_get_contents(__DIR__.'/../../version'));
\ No newline at end of file
defined('APP_VERSION') or define('APP_VERSION', file_get_contents(__DIR__ . '/../../version'));
......@@ -13,7 +13,7 @@ use yii\helpers\Html;
<h3><?= getenv('APP_NAME') ?></h3>
<p>
Application Version <b><?= getenv('APP_ID') ?>-<?= getenv('APP_VERSION') ?></b><br>
Application Version <b><?= getenv('APP_ID') ?>-<?= APP_VERSION ?></b><br>
Virtual Host <b><?= isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : '' ?></b><br/>
Hostname <b><?= getenv('HOSTNAME') ?: 'local' ?></b>
</p>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment