Environment variables?

To help with CI/CD git deployments, how would I implement environment variables for things like the content folder? For instance, on the server, I have the content folder location written in the index.php file like this:

$kirby = new Kirby([
    'roots' => [
        'content' => '/home/git/Dropbox/jfi-pw/content'
    ]
]);

but on my local instance, that should be written as:

$kirby = new Kirby([
    'roots' => [
        'content' => '~/Dropbox (Partner & Partners)/jfi-pw/content'
    ]
]);

any easy way to do this?

You could set the path in your environment dependent config file

return [
    'debug' => true,
    'content.path' => '~/Dropbox (Partner & Partners)/jfi-pw/content'
];

Then in your index.php

$kirby = new Kirby([
    'roots' => [
        'content' => option('content.path')
    ]
]);

Awesome, that worked perfectly!