.env interpolation within a settings file

I’ve been looking into interpolated env vars (https://docs.statamic.com/environments), but seem to be having problems using them within my ‘site/settings/system.yaml’ file.

Fyi: I have moved the statamic folder up a level and out of the public root folder following the steps described here: https://docs.statamic.com/knowledge-base/running-above-webroot. Everything seems to work except for specifying settings through the .env file

My .env var has this:

And I've set my content option to this:
root: "{env‌:WEB_ROOT}/site/content"

When I refresh the site, a folder named {env‌:WEB_ROOT} is created in my root folder and a Page not found error is returned.

Using the interpolated var in a template works as expected. The docs suggest that env vars can be parsed within the system.yaml file, so I must have missed something somewhere.

Any ideas?


Answered by Jason Varga!
>>>>>>> Answered <<<<<<<
4 Replies