From 2a4af44bbe30428a6fb44ec36486ef87027d4b04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Klinkovsk=C3=BD?= <1289205+lahwaacz@users.noreply.github.com> Date: Fri, 11 Oct 2024 06:24:46 +0200 Subject: [PATCH 1/3] Fix OVERWRITE_FILES env var in README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index bff3de703..d6174f4ef 100644 --- a/README.md +++ b/README.md @@ -287,7 +287,7 @@ Options: -o, --overwrite-files Enable overriding existing files during file upload - [env: OVERWRITE_FILES=] + [env: MINISERVE_OVERWRITE_FILES=] -r, --enable-tar Enable uncompressed tar archive generation From d0796aeb1a56da3b5721b491dbeaba8107e9a892 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Klinkovsk=C3=BD?= <1289205+lahwaacz@users.noreply.github.com> Date: Fri, 11 Oct 2024 06:25:29 +0200 Subject: [PATCH 2/3] Fix override.conf example in README ExecStart is a list, it needs to be cleared first. --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index d6174f4ef..2f4d51885 100644 --- a/README.md +++ b/README.md @@ -473,6 +473,7 @@ In case you want to customize the particular flags that miniserve launches with, and set the `[Service]` part in the resulting `override.conf` file. For instance: [Service] + ExecStart= ExecStart=/usr/bin/miniserve --enable-tar --enable-zip --no-symlinks --verbose -i ::1 -p 1234 --title hello --color-scheme monokai --color-scheme-dark monokai -- %I Make sure to leave the `%I` at the very end in place or the wrong path might be served. You From 1c4920041cf9bcc7806b362a1cdba1159a52f7ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Klinkovsk=C3=BD?= <1289205+lahwaacz@users.noreply.github.com> Date: Fri, 11 Oct 2024 06:38:01 +0200 Subject: [PATCH 3/3] Mention environment variables in the systemd section --- README.md | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 2f4d51885..9f8f10948 100644 --- a/README.md +++ b/README.md @@ -476,8 +476,16 @@ and set the `[Service]` part in the resulting `override.conf` file. For instance ExecStart= ExecStart=/usr/bin/miniserve --enable-tar --enable-zip --no-symlinks --verbose -i ::1 -p 1234 --title hello --color-scheme monokai --color-scheme-dark monokai -- %I -Make sure to leave the `%I` at the very end in place or the wrong path might be served. You -might additionally have to override `IPAddressAllow` and `IPAddressDeny` if you plan on making +Make sure to leave the `%I` at the very end in place or the wrong path might be served. +Alternatively, you can configure the service via environment variables: + + [Service] + Environment=MINISERVE_ENABLE_TAR=true + Environment=MINISERVE_ENABLE_ZIP=true + Environment="MINISERVE_TITLE=hello world" + ... + +You might additionally have to override `IPAddressAllow` and `IPAddressDeny` if you plan on making miniserve directly available on a public interface. ## Binding behavior