Git Product home page Git Product logo

Comments (8)

lisenz avatar lisenz commented on September 1, 2024 1

Yes, you're right.

the logs folder should be move out of the IIS folder.(I will improve this later.)

from zipdeploy.

FlukeFan avatar FlukeFan commented on September 1, 2024

Hi @lisenz,

The in-use files are renamed before recycling the application. When the application starts up again, the files should be removed: https://github.com/FlukeFan/ZipDeploy/blob/master/ZipDeploy/Cleaner.cs#L24

If that is not happening, can you tell me more about your setup so I can reproduce this?

Cheers

from zipdeploy.

lisenz avatar lisenz commented on September 1, 2024

Hi @FlukeFan
I tested my application a few more times later,the files was indeed removed,but the deployed.zip file is still not generated.
I am using the code from the quickstart example:services.AddZipDeploy();

Thanks

from zipdeploy.

FlukeFan avatar FlukeFan commented on September 1, 2024

Hmm ... that is strange, because that happens before the restart.

The (obsolete) files are renamed here: https://github.com/FlukeFan/ZipDeploy/blob/master/ZipDeploy/Unzipper.cs#L45
Then the publish.zip is renamed to deployed.zip here (2 lines below): https://github.com/FlukeFan/ZipDeploy/blob/master/ZipDeploy/Unzipper.cs#L48

Is there any log output to suggest why it's not getting that far? (Perhaps even in the application event logs?)

from zipdeploy.

lisenz avatar lisenz commented on September 1, 2024

@FlukeFan
I found the generated log file with hints in it:Error during moving file wwwroot/logs/log-20220317.txt to wwwroot\logs\zzz__log-20220317.txt.fordelete.txt System.IO.IOException: The process cannot access the file because it is being used by another process.

The following is the entire log file:
log-20220317.txt

from zipdeploy.

FlukeFan avatar FlukeFan commented on September 1, 2024

I think I see the problem. ZipDeploy is trying to update the IIS folder to have the same files as the zip file, but in your case, you are also logging to a 'logs' folder? (I think?)

So I suspect there are two options that might help:

  1. Don't log to the same folder as the binaries (e.g., move your logs folder out of the IIS folder);
  2. Tell ZipDeploy to ignore those files:

services.AddZipDeploy(o => o.IgnorePathStarting("wwwroot/logs"))

Let me know if that helps.

from zipdeploy.

lisenz avatar lisenz commented on September 1, 2024

Hi,I tried as you said and you're right.

Tell ZipDeploy to ignore the 'logs' folder:
services.AddZipDeploy(o => o.IgnorePathStarting("wwwroot/logs")),and it works.

My problem solved,thank you a lot.

from zipdeploy.

FlukeFan avatar FlukeFan commented on September 1, 2024

You're welcome, I'm glad that worked.

Just as an aside, I suspect that logging into the wwwroot folder might expose your logs files externally. (Possibly you don't want to do that.)

from zipdeploy.

Related Issues (3)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.