Comments (8)
Yes, you're right.
the logs folder should be move out of the IIS folder.(I will improve this later.)
from zipdeploy.
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.
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.
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.
@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.
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:
- Don't log to the same folder as the binaries (e.g., move your logs folder out of the IIS folder);
- Tell ZipDeploy to ignore those files:
services.AddZipDeploy(o => o.IgnorePathStarting("wwwroot/logs"))
Let me know if that helps.
from zipdeploy.
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.
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from zipdeploy.