Moving docker cmd stuff to a shellscript and moving away from ENTRYPOINT (there is no reason for an entrypoint right now) towards CMD

This commit is contained in:
Reto Bollinger 2024-11-17 22:11:44 +01:00
parent 97fa98b611
commit 88b0d97b48
2 changed files with 9 additions and 2 deletions

View file

@ -6,9 +6,12 @@ RUN pipx install lektor
RUN mkdir -p /opt/lektor/project && mkdir -p /opt/lektor/output
RUN sed -i '/de_DE.UTF-8/s/^# //g' /etc/locale.gen && locale-gen
COPY entrypoint.sh /opt/entrypoint.sh
RUN chmod +x /opt/entrypoint.sh
WORKDIR /opt/lektor/project
ENV PATH="$PATH:/root/.local/bin"
ENV CALENDAR_URL="https://backoffice.pc-stammertal.ch/remote.php/dav/public-calendars/RqLX5wj25aY6cpnP?export"
ENTRYPOINT [ "/root/.local/bin/lektor", "--project", "/opt/lektor/project", "server" ]
CMD [ "--host", "0.0.0.0" ]
CMD ["/opt/entrypoint.sh"]

View file

@ -0,0 +1,4 @@
#!/bin/bash
/opt/lektor/scripts/calendar-fetcher.sh ${CALENDAR_URL} > /opt/lektor/project/content/termine/contents.lr
/root/.local/bin/lektor --project /opt/lektor/project server --host 0.0.0.0