Skip to content

Configuring

Jason Mueller edited this page Sep 9, 2014 · 2 revisions

Applications will often require different configuration depending on where they are being deployed.

!!Configuring.md should be how to configuraiton application (which includes variables, scripts, etc.)!! appsettings / connection strings / scripts

As an example, consider an application configuration file for your application that is deployed with the application:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
    <appSettings>
        <add key="debuglevel" value="WARN" />
        <add key="databaseinstance" value="development" />
    </appSettings>
</configuration>

You can configure the application settings values at deployment time by passing them in when installing the package (or invoking a remote deployment):

Custom Scripts

Configuration Conventions

Powerdeploy provides multiple ways...

Application Setting Replacement

appsettings...

Install-DeploymentPackage `
        -PackageArchive SamplePackage_1.2.3.zip `
        -Environment Integration `
        -Variable @{ 'debuglevel' = 'ERROR'; 'databaseinstance' = 'integration' }

When Powerdeploy installs the package, it will automatically replace the values in the application configuration file with the values supplied on the command line.

<?xml version="1.0" encoding="utf-8"?>
<configuration>
    <appSettings>
        <add key="debuglevel" value="ERROR" />
        <add key="databaseinstance" value="integration" />
    </appSettings>
</configuration>

Connection String Replacement

Configuration variables provide a way to vary the configuration at deployment time in many ways.

Clone this wiki locally