diff --git a/dat.test/agenda/20250610.md b/dat.test/agenda/20250610.md new file mode 100644 index 0000000..843f6bf --- /dev/null +++ b/dat.test/agenda/20250610.md @@ -0,0 +1 @@ +20250610: agenda diff --git a/dat.test/agenda/20250619.md b/dat.test/agenda/20250619.md new file mode 100644 index 0000000..dbcd6bc --- /dev/null +++ b/dat.test/agenda/20250619.md @@ -0,0 +1 @@ +20250619: agenda diff --git a/dat.test/minutes/20250610.md b/dat.test/minutes/20250610.md new file mode 100644 index 0000000..db2a005 --- /dev/null +++ b/dat.test/minutes/20250610.md @@ -0,0 +1 @@ +20250610: minutes diff --git a/dat.test/minutes/20250619.md b/dat.test/minutes/20250619.md new file mode 100644 index 0000000..65f8b26 --- /dev/null +++ b/dat.test/minutes/20250619.md @@ -0,0 +1 @@ +20250619: minutes diff --git a/docker-compose.yaml b/docker-compose.yaml index 7220273..9f2b5cc 100755 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -1,3 +1,17 @@ +# +# By default the dat.live folder will be mounted. +# For testing you might like to switch to dat.test +# The HLBDAT environment variable will do this for you. +# If that variable is unset, dat.live will be used. +# To use dat.test instead, run this... +# +# $ HLBDAT=dat.test docker compose up +# +# ...but if you're happy to play with the live data +# this will do... +# +# $ docker compose up +# services: app: image: php:8.2-apache @@ -7,7 +21,7 @@ services: volumes: - ./app/:/var/www/html:Z - ./lib:/var/www/html/lib:Z - - ./dat.live:/var/www/html/dat:Z + - ./${HLBDAT:-dat.live}:/var/www/html/dat:Z networks: - labnet adm: @@ -18,7 +32,7 @@ services: volumes: - ./adm/:/var/www/html:Z - ./lib:/var/www/html/lib:Z - - ./dat.live:/var/www/html/dat:Z + - ./${HLBDAT:-dat.live}:/var/www/html/dat:Z networks: - labnet networks: diff --git a/lib/main.php b/lib/main.php index d750d10..9c91e6d 100755 --- a/lib/main.php +++ b/lib/main.php @@ -11,8 +11,8 @@ function getEvents() { $ctl = $dt -> format("YmdHi"); $entries[$i]["ctl"] = $ctl; $datestamp = $dt -> format("Ymd"); - $files = array( "agenda" => sprintf("agenda/%d.md", $datestamp) - , "minutes" => sprintf("minutes/%d.md", $datestamp) + $files = array( "agenda" => sprintf("dat/agenda/%d.md", $datestamp) + , "minutes" => sprintf("dat/minutes/%d.md", $datestamp) ); foreach ( $files as $key => $file ) { if ( file_exists( $file ) ) {