zoilomora / hikvision-to-mqtt

Sends alarm events from Hikvision DVR to MQTT
MIT License
17 stars 4 forks source link

hikvision-to-mqtt PHP file exits after a few seconds #3

Closed famprinz closed 3 years ago

famprinz commented 3 years ago

Hi - I'm new to Docker so it might be me.

That being said, maybe you can help me figure out how to get this working. The hikvision-to-mqtt_php container does not start. The log says ': No such file or directory. Do you know how to fix this?

zoilomora commented 3 years ago

I just did the test following the README.md and it worked for me without problems.

Could you attach a screenshot?

famprinz commented 3 years ago

That was quick ... attached the screenshots one two

famprinz commented 3 years ago

I downloaded the file and did "docker-compose up" Maybe I didn't do it right (new to docker). The "make start" command didn't work and I never got into the shell. Hence, could be me not getting it...

zoilomora commented 3 years ago

@famprinz if I don't run the make start command it won't work.

The make start command, among other things, download the dependencies. It is possible that the error is indicating that it cannot find autoload.php.

You have to download the dependencies before starting the docker container.

famprinz commented 3 years ago

Understood - I tried the make start but it keeps on telling me " 'make' is not recognized as an internal or external command, operable program or batch file." -

Thanks again for taking the time.

zoilomora commented 3 years ago

Can you give me more information about your environment?

make should be the default on any linux distribution.

famprinz commented 3 years ago

Sure

windows 10 Docker Desktop Version 2.3.0.4

zoilomora commented 3 years ago

I haven't used Windows with Docker in a long time.

Try running these commands (taken from the Makefile):

docker-compose down -v
docker-compose build
docker-compose pull
docker-compose run --rm php composer install
docker-compose run --rm php sh

Note: you may have to remove the volume mount from the ~/composer folder here.

famprinz commented 3 years ago

Its runnung :-)

Will check the rest tomorrow when I got the NVR plugged in again

famprinz commented 3 years ago

THANKS!!

zoilomora commented 3 years ago

@famprinz close the issus if the problem is solved 😉

famprinz commented 3 years ago

Next challenge - never did that either. ... will do