diff --git a/src/torrent-ingestor/.dockerignore b/src/torrent-ingestor/.dockerignore new file mode 100644 index 0000000..1d1fe94 --- /dev/null +++ b/src/torrent-ingestor/.dockerignore @@ -0,0 +1 @@ +Dockerfile \ No newline at end of file diff --git a/src/torrent-ingestor/Dockerfile b/src/torrent-ingestor/Dockerfile index 02ac4a6..26d591e 100644 --- a/src/torrent-ingestor/Dockerfile +++ b/src/torrent-ingestor/Dockerfile @@ -8,4 +8,10 @@ RUN poetry config virtualenvs.create false COPY . /app RUN poetry install --no-dev +RUN groupadd ingestor && useradd -g ingestor ingestor +USER ingestor + +HEALTHCHECK --interval=30s --timeout=30s --start-period=5s --retries=3 \ + CMD pgrep -f python || exit 1 + CMD ["python", "/app/torrent_ingestor/main.py"]