Fix cron env vars
This commit is contained in:
parent
9207200007
commit
c9431c62b8
@ -18,6 +18,7 @@ FROM debian:bullseye-slim
|
|||||||
# Install cron and clean default cron jobs
|
# Install cron and clean default cron jobs
|
||||||
RUN apt-get update && apt-get install -y --no-install-recommends cron && rm -rf /etc/cron.*/*
|
RUN apt-get update && apt-get install -y --no-install-recommends cron && rm -rf /etc/cron.*/*
|
||||||
|
|
||||||
|
# Creating the file like this is very suboptimal to say the least
|
||||||
RUN echo "0 0,12 * * * root cd /app && ./le-easy-certs >/proc/1/fd/1 2>/proc/1/fd/2\n" > /etc/crontab
|
RUN echo "0 0,12 * * * root cd /app && ./le-easy-certs >/proc/1/fd/1 2>/proc/1/fd/2\n" > /etc/crontab
|
||||||
RUN echo "@reboot root cd /app && ./le-easy-certs >/proc/1/fd/1 2>/proc/1/fd/2\n\n" >> /etc/crontab
|
RUN echo "@reboot root cd /app && ./le-easy-certs >/proc/1/fd/1 2>/proc/1/fd/2\n\n" >> /etc/crontab
|
||||||
|
|
||||||
@ -26,4 +27,10 @@ COPY --from=build /app/target/release/le-easy-certs /app/
|
|||||||
|
|
||||||
ENV LE_CONF=/le-conf/le-conf.toml
|
ENV LE_CONF=/le-conf/le-conf.toml
|
||||||
|
|
||||||
CMD [ "cron", "-f", "-l", "2" ]
|
# Creating the file like this is very suboptimal to say the least
|
||||||
|
RUN echo "#!/bin/sh" > /app/run.sh
|
||||||
|
RUN echo "env >> /etc/environment" >> /app/run.sh
|
||||||
|
RUN echo "cron -f" >> /app/run.sh
|
||||||
|
RUN chmod +x /app/run.sh
|
||||||
|
|
||||||
|
CMD [ "/app/run.sh" ]
|
||||||
Loading…
x
Reference in New Issue
Block a user