mirror of
https://github.com/AgathaSorceress/mstdn-ebooks.git
synced 2025-01-08 19:35:46 +01:00
Make timings customizable in Dockerfile
This commit is contained in:
parent
6cfe236526
commit
c93a67e219
12
Dockerfile
12
Dockerfile
@ -13,12 +13,14 @@ RUN apk add --virtual .build-deps gcc musl-dev libffi-dev openssl-dev \
|
|||||||
|
|
||||||
ADD *.py /ebooks/
|
ADD *.py /ebooks/
|
||||||
|
|
||||||
RUN (echo "*/30 * * * * cd /ebooks/ && python gen.py"; \
|
ENV EBOOKS_SITE=https://botsin.space
|
||||||
echo "5 */2 * * * cd /ebooks/ && python main.py"; \
|
ENV POST_TIMINGS="*/30 * * * *"
|
||||||
|
ENV FETCH_TIMINGS="5 */2 * * *"
|
||||||
|
|
||||||
|
RUN (echo "${POST_TIMINGS} cd /ebooks/ && python gen.py"; \
|
||||||
|
echo "${FETCH_TIMINGS} cd /ebooks/ && python main.py"; \
|
||||||
echo "@reboot cd /ebooks/ && python reply.py") | crontab -
|
echo "@reboot cd /ebooks/ && python reply.py") | crontab -
|
||||||
|
|
||||||
ENV ebooks_site=https://botsin.space
|
CMD (test -f data/config.json || echo "{\"site\":\"${EBOOKS_SITE}\"}" > data/config.json) \
|
||||||
|
|
||||||
CMD (test -f data/config.json || echo "{\"site\":\"${ebooks_site}\"}" > data/config.json) \
|
|
||||||
&& (test -f data/toots.db || (python main.py && exit)) \
|
&& (test -f data/toots.db || (python main.py && exit)) \
|
||||||
&& exec crond -f -L /dev/stdout
|
&& exec crond -f -L /dev/stdout
|
||||||
|
Loading…
Reference in New Issue
Block a user