locked
Deployment Slot Swapping - Excluding a directory RRS feed

  • Question

  • My app has a directory which is dynamic (app creates it and adds some content there).

    Whenever I swap a deployment, the dynamic folder is wiped out (because the other deployment does not contain that directory).

    Is there a way to prevent this? Maybe a way to exclude a particular directory?

    Thanks

    • Edited by Jandieg Wednesday, November 4, 2015 6:23 PM typo
    Wednesday, November 4, 2015 5:55 PM

Answers

  • There is no way to exclude a folder during the swap. The slots are effectively tow separate sites, and all the files they contain get swapped.

    The best option is probably to externalize the data into Azure Storage (blob) or a database.

    thanks,
    David

    • Proposed as answer by David Ebbo Wednesday, November 4, 2015 6:17 PM
    • Marked as answer by Jandieg Wednesday, November 4, 2015 6:32 PM
    Wednesday, November 4, 2015 6:17 PM

All replies

  • There is no way to exclude a folder during the swap. The slots are effectively tow separate sites, and all the files they contain get swapped.

    The best option is probably to externalize the data into Azure Storage (blob) or a database.

    thanks,
    David

    • Proposed as answer by David Ebbo Wednesday, November 4, 2015 6:17 PM
    • Marked as answer by Jandieg Wednesday, November 4, 2015 6:32 PM
    Wednesday, November 4, 2015 6:17 PM
  • Yes I was thinking about blob too.

    Btw, will a second slot cost as an additional site?


    Regards

    Wednesday, November 4, 2015 6:25 PM
  • The cost is per App Service Plan, so since the slot is (typically) in the same Plan (meaning it shares the same VMs), there is no additional cost.

    David

    Wednesday, November 4, 2015 6:27 PM