Manual start on Web Site deploy


I’m trying to deploy a Web Site with steps that would look to something like this:

  1. Run powershell script that:
    1. Stops the Web site to be deployed
    2. Starts the maintenance Web Site (handles the same binding as the main website)
  2. Deploys the main web site while it’s stopped
  3. Run powershell script that reverses what step one did

The problem is that the web site deployment tries to automatically start the web site after deploying. Is there any way to turn it off so I can do it with a script afterwards?

I’ve already looked at this post, but it really seems clunkier than a 2 lines powershell script that starts/stops web sites and is sure to handle all requests.

Thanks in advance for your help!

Hi Philippe,

I was able to simulate your scenario by adding the following scripts:


Stop-Website Website
Start-Website Maintenance


Stop-Website Maintenance

Post-Deploy: None

You can do this either via the UI or embed in the package

If you need tighter control, you setup your deployment with the relevent IIS WebSite steps from the community library (IIS section) and a package deployment step that does not configure IIS at all.

Another option, if all you need is a single page, is to drop a app_offline.htm into the previous installation directory (which you can get via the Octopus.Tentacle.PreviousInstallation.OriginalInstalledPath or Octopus.Tentacle.PreviousInstallation.CustomInstallationDirectory variable). When the new deployment completes, it repoints the website to the new installation directory and the website comes back online.

Hope that helps,

Robert W

Hey Roboert, thanks for the information.

Sorry for the noob question, I’m getting used to the product. I dug a little bit more in the templates and I realize that pretty much anything can be done. I’ll also make sure to read a little bit more about embedded script in the deployment package which can come handy.

Thanks again for the quick reply!

Have a nice day!