kerberos-io / web

(DEPRECATED) An open source GUI to configure the machinery and to view events that were detected by the machinery.
https://www.kerberos.io
225 stars 69 forks source link

Web doesn't work with EncFS mout as a capture in docker compose #121

Open HNKNTA opened 6 years ago

HNKNTA commented 6 years ago

It looks like the capture directory is missing. Please create the directory: /etc/opt/kerberosio/capture/.

The message above appears after I open the UI using EncFS mout in docker compose. Docker compose file:

version: '3.2'

services:
    machinery:
        image: kerberos/machinery
        ports:
        - "127.0.0.1:9889:8889"
        volumes:
        - capture:/etc/opt/kerberosio/capture
        - config:/etc/opt/kerberosio/config
        - logs:/etc/opt/kerberosio/logs

    web:
        image: kerberos/web
        environment:
        - KERBEROSIO_SECURE_SSL=false
        ports:
        - "80:80"
        - "443:443"
        volumes:
        - capture:/etc/opt/kerberosio/capture
        - config:/etc/opt/kerberosio/config
        - logs:/etc/opt/kerberosio/logs
        links:
        - machinery

volumes:
    capture:
        driver_opts:
          type: none
          device: /mnt/decrypted/capture
          o: bind
    config:
    logs:

If I remove the capture check in app/Http/Middleware/HasCaptureDirectory, the UI starts as usual, it is possible to add a camera and get some video recordings done. But in the UI there is no any records. As I can see inside the containers the mount is present and accessible.

Also I've tried to run php console and make is_directory(/etc/opt/kerberosio/capture) and its 1. As I can understand during the running this function returns false.

cedricve commented 6 years ago

Hey,

Thanks for reporting. We have merged the two containers to only one image (but it's in BETA). Can you give it a try? http://hub.docker.com/r/kerberos/kerberos

HNKNTA commented 6 years ago

Hi Cédric,

Thanks for reply. I've set up merged image with mounted EncFS dir and it gives the same result. docker run --name kerberos_merged_1 -d -p 80:80 -v /mnt/decrypted/capture:/etc/opt/kerberosio/capture kerberos/kerberos

Yesterday I've tried to use gcloud bucket via their gcs-fuse - FUSE module and looks like it has the same (or similar) problem. I can just guess that it is some PHP issue related to FUSE drives.