docspell icon indicating copy to clipboard operation
docspell copied to clipboard

Is the default docker-compose dsc container supposed to scan for files automatically?

Open rpgdev opened this issue 1 year ago • 14 comments

Hi, I'm wondering if using the default dsc config in https://github.com/eikek/docspell/blob/a7bc973345d9f9b39d03239cf0f92d910c416848/docker/docker-compose/docker-compose.yml#L90 is dsc supposed to automatically scan in files dropped in ./docs without further involvement from me? Or do I need to do something else?

rpgdev avatar Feb 22 '24 13:02 rpgdev

It should watch the directory and push files as soon as they arrive. No involvement necessary otherwise.

eikek avatar Feb 24 '24 14:02 eikek

@eikek it's not working for some reason, what can I do to verify the cause?

rpgdev avatar Feb 24 '24 17:02 rpgdev

Are you using the standard compose file with no change? If not, how does it look like? Are you using perhaps a network file system to watch?

eikek avatar Feb 24 '24 17:02 eikek

I changed it slightly:

consumedir:
    image: docspell/dsc:latest
    container_name: docspell-consumedir
    command:
      - dsc
      - "-d"
      - "http://docspell-restserver:7880"
      - "watch"
      - "--delete"
      - "-ir"
      - "--not-matches"
      - "**/.*"
      - "--header"
      - "Docspell-Integration:${DOCSPELL_SERVER_INTEGRATION_PASSWORD}"
      - "/opt/docs"
    restart: unless-stopped
    environment:
      - TZ=${TZ}
      - PUID=${PUID}
      - PGID=${PGID}
    volumes:
      - ${DATA}/documents/docspell_watch:/opt/docs
    depends_on:
      - restserver

Every other the ${VARS} are just environment variables for OMV to replace. Inspecting the container for consumedir I can see the real values being replaced for them. Edit: I'm not using a network filesystem as the target but a mergerfs pool @eikek

rpgdev avatar Feb 24 '24 22:02 rpgdev

@rpgdev I don't know how mergerfs works, I can imagine that it perhaps doesn't work with inotify. In this case, the events won't happen. The same applies to network filesystems. In this case you would need to revert to periodic polling, I think.

eikek avatar Feb 25 '24 08:02 eikek

I can imagine that it perhaps doesn't work with inotify

Didn't see a reference to that in the mergerfs docs, looks like it should. I'll do some further research on that.

In this case you would need to revert to periodic polling, I think.

How do I do that?

rpgdev avatar Feb 25 '24 15:02 rpgdev

You can look at the options to the upload command. It traverse directories and accepts a --poll option to do so periodically.

eikek avatar Feb 25 '24 19:02 eikek

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. This only applies to 'question' issues. Always feel free to reopen or create new issues. Thank you!

github-actions[bot] avatar Mar 27 '24 02:03 github-actions[bot]

@eikek sorry but I tried pointing to the actual directory in the filesystem instead of the mergerfs pool and the document it's still not being picked up :( how can I debug this and find the problem?

rpgdev avatar Mar 27 '24 22:03 rpgdev

Btw, I'm not trying the poll command, I want to get the consumedir service to work.

rpgdev avatar Mar 27 '24 22:03 rpgdev

how can I debug this and find the problem?

Hi @rpgdev you can increase verbosity by using -vv option to dsc.

Btw, I'm not trying the poll command, I want to get the consumedir service to work.

Not sure if I understand here, but you can use polling to implement the consumedir service.

eikek avatar Apr 02 '24 06:04 eikek

@eikek why is the consumedir service not working though? That's what I want to figure out. Where should I use the -vv option?

rpgdev avatar Apr 02 '24 13:04 rpgdev

The -vv is an option to the dsc command. You can find out more with dsc --help.

eikek avatar Apr 02 '24 18:04 eikek

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. This only applies to 'question' issues. Always feel free to reopen or create new issues. Thank you!

github-actions[bot] avatar May 03 '24 02:05 github-actions[bot]