mirror of
https://git.bolliret.ch/pcs/pcs-website
synced 2026-01-18 16:41:37 +01:00
Dealing with Dockers illogical CMD. Now the container can be run with an explicit command or without one (in which case the server will be run). In either case the scripts which update the dates will be run before
This commit is contained in:
parent
f1935319ab
commit
43d90086d0
3 changed files with 6 additions and 2 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -1,3 +1,4 @@
|
||||||
public/
|
public/
|
||||||
lektor/lektordata/output/
|
lektor/lektordata/output/
|
||||||
|
lektor/lektordata/build/
|
||||||
.DS_Store
|
.DS_Store
|
||||||
|
|
|
||||||
|
|
@ -18,4 +18,6 @@ WORKDIR /opt/lektor/project
|
||||||
ENV PATH="$PATH:/root/.local/bin"
|
ENV PATH="$PATH:/root/.local/bin"
|
||||||
ENV CALENDAR_URL="https://backoffice.pc-stammertal.ch/remote.php/dav/public-calendars/RqLX5wj25aY6cpnP?export"
|
ENV CALENDAR_URL="https://backoffice.pc-stammertal.ch/remote.php/dav/public-calendars/RqLX5wj25aY6cpnP?export"
|
||||||
|
|
||||||
CMD ["/opt/entrypoint.sh"]
|
ENTRYPOINT ["/opt/entrypoint.sh"]
|
||||||
|
|
||||||
|
CMD /root/.local/bin/lektor --project /opt/lektor/project server --host 0.0.0.0
|
||||||
|
|
@ -5,4 +5,5 @@ sh -c ". /opt/venv/bin/activate && exec python /opt/lektor/scripts/calendar-fetc
|
||||||
tempfile=$(mktemp)
|
tempfile=$(mktemp)
|
||||||
sh -c ". /opt/venv/bin/activate && exec python /opt/lektor/scripts/calendar-fetcher-main.py ${CALENDAR_URL} > $tempfile"
|
sh -c ". /opt/venv/bin/activate && exec python /opt/lektor/scripts/calendar-fetcher-main.py ${CALENDAR_URL} > $tempfile"
|
||||||
mv $tempfile /opt/lektor/project/content/contents.lr
|
mv $tempfile /opt/lektor/project/content/contents.lr
|
||||||
/root/.local/bin/lektor --project /opt/lektor/project server --host 0.0.0.0
|
|
||||||
|
exec "$@"
|
||||||
Loading…
Add table
Reference in a new issue