diff --git a/Dockerfile b/Dockerfile index caa0d2a..dfc9e42 100644 --- a/Dockerfile +++ b/Dockerfile @@ -28,8 +28,11 @@ RUN git clone https://github.com/barbequesauce/watcher3 && \ adduser -D -u $HTPC_UID -G $HTPC_GROUP -H $HTPC_USER && \ chown -R $HTPC_USER:$HTPC_GROUP /watcher3 +ADD start.sh /usr/local/bin/start.sh +RUN chmod 755 /usr/local/bin/start.sh + EXPOSE 9090 USER $HTPC_USER -CMD [ "/usr/bin/python3", "/watcher3/watcher.py", "--userdata=/config/" ] +CMD [ "/usr/local/bin/start.sh" ] diff --git a/start.sh b/start.sh new file mode 100644 index 0000000..fb6c577 --- /dev/null +++ b/start.sh @@ -0,0 +1,6 @@ +#!/bin/sh +## +## Script to start the sonarr server +## +until [ -f "/config/watcher.sqlite" ]; do sleep 10; done +/usr/bin/python3 /watcher3/watcher.py --userdata=/config/