Add a docker image for watching a directory

This commit is contained in:
Eike Kettner
2020-05-25 19:43:06 +02:00
parent f33c2a2293
commit 3d902c3273
4 changed files with 57 additions and 0 deletions

View File

@ -0,0 +1,15 @@
FROM alpine:latest
LABEL maintainer="eikek0 <eike@docspell.org>"
RUN apk add --no-cache unzip curl bash inotify-tools
RUN mkdir -p /opt \
&& cd /opt \
&& curl -L -o docspell.zip https://github.com/eikek/docspell/releases/download/v0.6.0/docspell-tools-0.6.0.zip \
&& unzip docspell.zip \
&& rm docspell.zip \
&& apk del unzip \
&& chmod 755 /opt/docspell-tools-0.6.0/*.sh
ENTRYPOINT ["/opt/docspell-tools-0.6.0/consumedir.sh"]

View File

@ -29,5 +29,16 @@ services:
- ${PWD}/docspell.conf:/opt/docspell.conf
depends_on:
- db
consumedir:
image: eikek0/docspell:consumedir-0.6.0
container_name: docspell-consumedir
command: --path /opt/docs -m http://restserver:7880/api/v1/open/upload/item/$SOURCE_ID
environment:
- SOURCE_ID=${SOURCE_ID:-none}
volumes:
- ${PWD}/docs:/opt/docs
depends_on:
- restserver
volumes:
postgres_data: