- Adds `--db-location` command-line option for specifying a custom database location. - Updates documentation to reflect the new database persistence feature. - Modifies `get_db_path` to accept and use the `--db-location` argument. - Creates `/data` directory in the Docker container for database persistence. - Updates README.md to explain database persistence and provide usage examples.
18 lines
694 B
Docker
18 lines
694 B
Docker
FROM python:alpine
|
|
|
|
RUN apk add --no-cache curl \
|
|
&& SUPERCRONIC_SHA1SUM=71b0d58cc53f6bd72cf2f293e09e294b79c666d8 \
|
|
&& SUPERCRONIC_URL=https://github.com/aptible/supercronic/releases/download/v0.2.33/supercronic-linux-amd64 \
|
|
&& curl -fsSLO "$SUPERCRONIC_URL" \
|
|
&& echo "${SUPERCRONIC_SHA1SUM} supercronic-linux-amd64" | sha1sum -c - \
|
|
&& chmod +x supercronic-linux-amd64 \
|
|
&& mv supercronic-linux-amd64 /usr/local/bin/supercronic \
|
|
&& apk del curl
|
|
|
|
RUN mkdir -p /data
|
|
|
|
RUN pip install --no-cache-dir subscleaner
|
|
|
|
CMD echo "${CRON:-0 0 * * *} find /files -name \"*.srt\" | $(which subscleaner) --db-location /data/subscleaner.db" > /crontab && \
|
|
/usr/local/bin/supercronic /crontab
|