Deploying Multiple Configuration files

Hello,

I was wondering if Octopus Deploy can handle deploying multiple configuration files (ex. license files, etc). If so, how can this be accomplished.

Hi Corey,

Thanks for getting in touch! When you deploy applications with Octopus, the application is packaged into a NuGet package file. This package contains all of the files needed for deployment - that can include binaries, views, images, scripts, web.config files, and other configuration files.

Octopus does a number of things to modify configuration files if you desire:

These will work on all .config files in the package, not just the primary web.config file.

Hope that helps, let me know if you have any other questions!

Paul

Thanks for the response! I also have some more questions:

We have an external appsettings.config file which varies by environment we are deploying but we don’t like to do transformations. We just simply want those files to be copied to the environment after the core files were deployed. How can this be achieved? Can we just deploy these files without packaging and if so how?

Hi,

Would something like this work?

  1. Package all the files, with a different name per environment - e.g., “appsettings-Production.config”, “appsettings-Test.config”.

  2. In your Deploy.ps1 file, do something like this:

    $envName = $OctopusParameters[“Octopus.Environment.Name”]
    copy-item (“appsettings-” + $envname + “.config”) “appsettings.config”

Hope that helps!

Paul