From d8c9acc36c6b434789ae14e648f952192d172bcf Mon Sep 17 00:00:00 2001 From: John Bowdre Date: Mon, 8 Aug 2022 08:47:01 -0500 Subject: [PATCH] add LIBRARY_BROWSE flag to make the library web server browseable --- client/build/entrypoint.sh | 4 ++++ client/docker-compose.yaml | 1 + 2 files changed, 5 insertions(+) diff --git a/client/build/entrypoint.sh b/client/build/entrypoint.sh index 927a9ea..17dc13c 100644 --- a/client/build/entrypoint.sh +++ b/client/build/entrypoint.sh @@ -32,6 +32,10 @@ EOF fi fi +if [ "$LIBRARY_BROWSE" == "true" ]; then + sed -i 's/file_server/file_server browse/' /etc/caddy/Caddyfile +fi + echo -e "[$(date +"%Y/%m/%d-%H:%M:%S")] Starting caddy..." /usr/sbin/caddy start -config /etc/caddy/Caddyfile diff --git a/client/docker-compose.yaml b/client/docker-compose.yaml index a0dda95..621f323 100644 --- a/client/docker-compose.yaml +++ b/client/docker-compose.yaml @@ -14,6 +14,7 @@ services: - TLS_NAME=library.lab.bowdre.net - TLS_CUSTOM_CERT=true - LIBRARY_NAME=Library + - LIBRARY_BROWSE=true ports: - "80:80/tcp" - "443:443/tcp"