Skip to content

Instantly share code, notes, and snippets.

@torresdal
Last active January 2, 2016 20:49
Show Gist options
  • Save torresdal/8359122 to your computer and use it in GitHub Desktop.
Save torresdal/8359122 to your computer and use it in GitHub Desktop.
Code snippets for ConDep Doc version 1.0 - Getting Started
public class WebServerInfrastructure : InfrastructureArtifact
{
public override void Configure(IOfferInfrastructure require, ConDepConfig config)
{
require
.IIS()
.IISAppPool("MyAppPool")
.IISWebSite("MyWebSite", 5, opt => opt
.ApplicationPool("MyAppPool")
.WebApp("MyWebApp", webAppOpt => webAppOpt
.PhysicalPath(@"E:\MyWebSite\MyWebApp")
)
);
}
}
public class MyWebApp :
ApplicationArtifact,
IDependOnInfrastructure<WebServerInfrastructure>
{
"Servers" :
[
{
"Name": "Server1"
},
{
"Name": "Server2"
}
]
}
public class MyWebApp : ApplicationArtifact
{
public override void Configure(IOfferLocalOperations local, ConDepConfig config)
{
local.ToEachServer(server =>
{
server.Deploy.Directory(@"C:\MyWebSite\MyWebApp", @"E:\MyWebSite\MyWebApp");
});
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment