Search code examples
iis-7octopus-deploy

Octopusdeploy deploy multiple sites from one package


I have a unique situation where I have a package created by TeamCity which contains two sites. For e.g. package-1.0.zip contains Site1 and Site2 in it.

How can I deploy these two sites using octopus deploy? Both sites have their own application pool, config transformation, etc..

Is there any way, I can reference those two folders inside the package when creating IIS site deployment steps so that I can create two steps to deploy those two different sites?

Thanks


Solution

  • I think you can achieve this by having two "Deploy to IIS" steps in your Process and changing the Physical Path setting to "Relative path under package installation directory"

    relative path setting

    This should allow you to configure each site with different IIS settings while still using the same package.

    Edit: based on your comments, this process may work for you

    1. Use the Deploy a Package step to deploy the package contents to the target machine.
    2. Enable custom deployment scripts (click "Configure Features" next to the Save button on the step details and then select "Custom deployment scripts").
    3. Write a custom deployment script to copy Site1 and Site2 to the appropriate folders.
    4. If you need to configure IIS after that step (site, app pool, etc) there are many Community Step templates for those actions. Search for IIS to see the full listing.