New Lektor Approach:

  build your lektor docker container:

    docker build -t lektorcontainer lektor/docker

  run your lektor server

    docker run -it -v ${PWD}/lektor/lektordata:/opt/lektor -p 5000:5000 lektorcontainer lektor serve -h 0.0.0.0    

  access it with your browser:

    http://localhost:5000

  thats all!


  To update "Home" and Termine" pages run the following commands (or just restart the docker container as it does this automatically at start):

  docker run -v ${PWD}/lektor/lektordata:/opt/lektor lektorcontainer /bin/bash -c "/opt/lektor/scripts/calendar-fetcher-main.sh 'https://backoffice.pc-stammertal.ch/remote.php/dav/public-calendars/RqLX5wj25aY6cpnP?export' > /opt/lektor/project/content/contents.lr"
  docker run -v ${PWD}/lektor/lektordata:/opt/lektor lektorcontainer /bin/bash -c "/opt/lektor/scripts/calendar-fetcher.sh 'https://backoffice.pc-stammertal.ch/remote.php/dav/public-calendars/RqLX5wj25aY6cpnP?export' > /opt/lektor/project/content/termine/contents.lr"


  building the website for deployment is:

    docker run -it -v ${PWD}/lektor/lektordata:/opt/lektor -p 5000:5000 lektorcontainer lektor build -O /opt/lektor/output

  deployemnt can then be found in:

    lektor/lektordata/output



  If you would like to start from scratch you would delete all contents in lektordata/project and run the following command (but that will interfere with the scripts run by entrypoint.sh!)

     docker run -it -v ${PWD}/lektor/lektordata:/opt/lektor lektorcontainer lektor quickstart

