Multi environment-lite Morning folks. First time doing multi-environment in Craft 3, and separate installations for staging and production is a bit overkill for this particular project. Instead I just want to show a few new bits in templates on the staging subdomain until sign-off.

Staging domain (https://staging.adddress.com) is pointed at the production 'public' directory. So in Craft 2, I'd just let the 'staging' key in my config.php set all the necessary environment variables. But in Craft 3 don't I need to load the correct .env first? Since it's all the same installation, is there a way to switch to .env.staging when on the staging subdomain? Is that the correct/best approach? Thanks.
Alright, so turns out all I need to do is comment out the following line in index.php:

define('CRAFT_ENVIRONMENT', getenv('ENVIRONMENT') ?: 'production');


Now I can use config.php keys, same way I did in Craft 2. For example:

'*' =&gt; [
    // My default/production variables
    'devMode' =&gt; false,
    etc...
],
// Local
'address.test' =&gt; [
    // Local variables
    'devMode' =&gt; true,
    etc...
]
// Staging
'staging.address.com' =&gt; [
    // Staging variables
    'devMode' =&gt; true,
    etc...
]


Thanks to Luke James for the assist on Slack.