Use the same folder for web deployment

Will it be possible to use the same web deployment folder and override everything in it because we have static files that can’t be integrated in the source control for some reasons.
That would be great if we could choose whether we can have an history of the deployment or just override the current web application.

Hi,

Thanks for the good suggestion. I’m not sure it will be done for Octopus 1.0, but it’s in the backlog. For now, here are some suggestions that could help:

A better way to handle static files might be to put them on a file share or well-known path, and store the path in your configuration file (and have Octopus set it). You can then serve them up using HttpContext.Response.WriteFile or ASP.NET MVC’s FileResponse. That’s the approach we normally use for file uploads, because it has a few extra benefits:

  1. It gives you more control over what files are/aren’t visible
  2. It allows you to share the assets over multiple web servers

If you need a workaround, you could write a custom Deploy.ps1 script that either a) copies the files from a well-known location into the newly deployed package folder, or b) copies the extracted files into a folder name without the version, and updates IIS accordingly.

If the assets are all under one folder, you could also set up a virtual directory under the website and point it to that folder - it would be a one-off thing and wouldn’t be affected by subsequent website deployments.

Paul

Thank you for the answer Paul
Great work you have done here