Allowing CRAFT_TEMPLATE_PATH in index.php from .env variable
If you add it after you load the dot env stuff in your public index.php file, it should work:

// Load dotenv?
if (file_exists(CRAFT_BASE_PATH.'/.env')) {
    (new Dotenv(CRAFT_BASE_PATH))-&gt;load();
}

define('CRAFT_TEMPLATE_PATH', getenv('CRAFT_TEMPLATE_PATH'));