FROM docker.io/creativeprojects/resticprofile:0.31.0
ENV TZ=UTC

RUN set -eux && \
    apk update && \
    apk add sqlite && \
    mkdir -p /app/var/backups

WORKDIR /etc/resticprofile

COPY . .
RUN chmod +x db_dump.sh entrypoint.sh && \
    resticprofile schedule --all

ENTRYPOINT ["/etc/resticprofile/entrypoint.sh"]
CMD ["crond", "-f", "-l", "2"]
