Switched to using .environment.json for setting up wp-config.php (borrowed from the fine people at work).