ispyagentdvr-docker icon indicating copy to clipboard operation
ispyagentdvr-docker copied to clipboard

missing commands folder

Open ispysoftware opened this issue 3 years ago • 9 comments
trafficstars

getting reports that commands list is empty (server menu, commands)

  • the setup script is missing a / at the end of commands, not sure if this is the issue?

docker run -it -p 8090:8090 -p 3478:3478/udp -p 50000-50010:50000-50010/udp
-v /appdata/ispyagentdvr/config/:/agent/Media/XML/
-v /appdata/ispyagentdvr/media/:/agent/Media/WebServerRoot/Media/
-v /appdata/ispyagentdvr/commands/:/agent/Commands/
-e TZ=America/Los_Angeles
--name ispyagentdvr doitandbedone/ispyagentdvr

ispysoftware avatar Sep 30 '22 09:09 ispysoftware

Hi Sean, no this is not the cause. Docker doesn't copy the content of the folder on the destination volume.

...a question, does the /config folder already contain files or are they generated at the first start?

alexbn71 avatar Sep 30 '22 12:09 alexbn71

If the folder already exists, aka there from older versions it will persist whatever is there from host. This is setup on command ir by user on the first time. As for the container or the app. It has files on the first install that docker will pass on to the host and persist from that point on.

On Fri, Sep 30, 2022, 5:00 AM Alessandro Blason @.***> wrote:

Hi Sean, no this is not cause. Docker doesn't copy the content of the folder on the destination volume.

...a question ... does the /config folder already contain files or are they generated at the first start?

— Reply to this email directly, view it on GitHub https://github.com/doitandbedone/ispyagentdvr-docker/issues/495#issuecomment-1263482316, or unsubscribe https://github.com/notifications/unsubscribe-auth/AORTFNAANX2IOSAYSFJBWNTWA3I5JANCNFSM6AAAAAAQZTLBBM . You are receiving this because you are subscribed to this thread.Message ID: @.***>

doitandbedone avatar Sep 30 '22 14:09 doitandbedone

Yes this is the theory :) but in realty it doesn't happen this way. I've installed the image without the folder already present and the "commands" folder is created empty. I've verified this on two different machine.... and I don't understand why

alexbn71 avatar Sep 30 '22 15:09 alexbn71

Oh commands. That's different, you asked for /config which should be populated

On Fri, Sep 30, 2022, 8:21 AM Alessandro Blason @.***> wrote:

Yes this is the theory :) but in realty it doesn't happen this way. I've installed the image without the folder already present and "commands" folder is created empty. I've verified this on two different machine.

— Reply to this email directly, view it on GitHub https://github.com/doitandbedone/ispyagentdvr-docker/issues/495#issuecomment-1263711560, or unsubscribe https://github.com/notifications/unsubscribe-auth/AORTFNA3PTNYL6BCSBQCKTTWA4ARFANCNFSM6AAAAAAQZTLBBM . You are receiving this because you commented.Message ID: @.***>

doitandbedone avatar Sep 30 '22 17:09 doitandbedone

I asked for /config to Sean because this folder is correctly populated. Instead /commands that should contains some files it's always empty. AgentDVR has some file already present in /commands folder.... some .bat files

alexbn71 avatar Sep 30 '22 17:09 alexbn71

As suspected the "Media" folder where resides "Config" folder, is created by AgentDVR on first start and populated with default files... instead the "Commands" folder is already present (and populated) in the .zip package of the software. This explain why "config" folder behaviour is different from "commands".

The mistery is why /Commands content isn't replicated on host path

alexbn71 avatar Sep 30 '22 20:09 alexbn71

After some searches on GG I found that when you mount a host directory into container, the contents of host directory shadow the contents of container. For this reason it's empty after install (because the new created directory is obviously empty). To avoid this, named volumes should be used... but named volumes resides on docker installation path and and they are not comfortable to use all the time.

Maybe a workaround should be made by AgentDVR copying the list of .bat files from a temporary folder to /Commands at first start, similar to how it creates and populates the folder "Media".

alexbn71 avatar Sep 30 '22 20:09 alexbn71

i've updated it to store all content in a content folder and install it to the relevant locations on first run

ispysoftware avatar Oct 03 '22 06:10 ispysoftware

Thank you :)

alexbn71 avatar Oct 03 '22 06:10 alexbn71

@ispysoftware Is this still an issue? Since it's reopened.

doitandbedone avatar Oct 28 '22 08:10 doitandbedone

Tested now in 4.3.3.0... \Commands folder is still empty

alexbn71 avatar Oct 28 '22 12:10 alexbn71

should be copying the commands in there on start, same as it does for masks and sounds - check the logs seems to be working here

image

ispysoftware avatar Oct 28 '22 22:10 ispysoftware

Closed as resolved

doitandbedone avatar Jan 29 '23 17:01 doitandbedone