diff --git a/file-browser/Dockerfile b/file-browser/Dockerfile index c62328f..3c84594 100644 --- a/file-browser/Dockerfile +++ b/file-browser/Dockerfile @@ -1,7 +1,10 @@ -FROM caddy:2.6.1-alpine +FROM alpine:3.19 LABEL org.opencontainers.image.source https://github.com/offspot/container-images -RUN mkdir -p /data -COPY config.json /config/caddy/autosave.json +RUN apk add --no-cache lighttpd \ + && mkdir -p /data -CMD ["caddy", "run", "--resume"] +COPY lighttpd.conf /etc/lighttpd/lighttpd.conf + +EXPOSE 80 +CMD ["lighttpd", "-D", "-f", "/etc/lighttpd/lighttpd.conf"] diff --git a/file-browser/README.md b/file-browser/README.md index f6d3533..7f4c90e 100644 --- a/file-browser/README.md +++ b/file-browser/README.md @@ -1,6 +1,6 @@ # file-browser -An Caddy-based image for serving static files +A lighttpd-based image for serving static files ## Usage diff --git a/file-browser/config.json b/file-browser/config.json deleted file mode 100644 index 8357e74..0000000 --- a/file-browser/config.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "admin": { - "disabled": true - }, - "apps": { - "http": { - "servers": { - "srv0": { - "automatic_https": { - "disable": true - }, - "errors": { - "routes": [ - { - "handle": [ - { - "body": "HTTP {http.error.status_code} Error", - "handler": "static_response" - } - ] - } - ] - }, - "listen": [ - ":80" - ], - "routes": [ - { - "handle": [ - { - "browse": {}, - "root": "/data", - "handler": "file_server", - "index_names": ["index.html", "index.txt", "index"] - } - ] - } - ] - } - } - } - } -} diff --git a/file-browser/lighttpd.conf b/file-browser/lighttpd.conf new file mode 100644 index 0000000..513195c --- /dev/null +++ b/file-browser/lighttpd.conf @@ -0,0 +1,6 @@ +server.document-root = "/data" +index-file.names = ( "index.html", "index.txt", "index" ) +dir-listing.activate = "enable" +dir-listing.encoding = "utf-8" +dir-listing.sort = "disable" +dir-listing.cache = ( "path" => "/var/cache", "max-age" => 600 )