Same config for 2 applications

I am deploying a windows service with 2 instances on the same server, the config for the staging release has a service.exe.staging.config and inside it has an NLog entry which points to a logs folder which is say c:\logs.

What I need to be able to do is deploy the service and then change the log directory on both instances, eg c:\logs\instance1\ and c:\logs\instance2 - so that the logs for one service done write to the same folder as the second service.

Is there a better way than deploying and then hand crafting this change via powershell editng the config?


Thanks for reaching out. The variable Substitution feature might be what you are looking for

This way you can add a variable where the log path goes on your config, and Octopus will replace the value of that variable during the deployment.

Hope that helps,


Oh thanks for that not seen this before! - I shall give it a go much appreciated.